← Introduction to GIS Software: QGIS

In-class Excercises

Part 1: Georeferencing

  1. Go to Urban Reviewer.
  2. Find an urban renewal plan with a map image on the right when you select it. If you have a hard time finding one with a scanned map, use the Pratt Institute plan.
  3. Click on the image to make it larger, then right click on it and save as to save it to your computer.
  4. Open QGIS.
  5. Add a satellite base layer with labels. I would suggest the Google Hybrid layer.
  6. Zoom to the general area your image should be in.
  7. Install or enable Georeferencer GDAL in the plugins area of QGIS.
  8. Go to Raster > Georeferencer > Georeferencer to open the Georeferencer window.
  9. Go to File > Open Raster and select the image you downloaded from Urban Reviewer.
  10. Add 3 or 4 ground control points:
    1. Switch between the Georeferencer and map windows and find a common point between the two (generally a street corner will be best).
    2. Click the Add point button in the Georeferencer window.
    3. Click on the common point in the Georeferencer window.
    4. When prompted to Enter map coordinates, select the From map canvas button.
    5. Click on the common point on the map.
  11. Once you are happy with the ground control points, click the Settings icon in the Georeferencer window.
  12. Set Transformation type to Thin plate spline.
  13. Set Target SRS to 3857 (the projection the reference map is in).
  14. Select a location to save to.
  15. Check Load in QGIS when done.
  16. Click Start Georeferencing in the Georeferencer window (looks like a play button).
  17. The Georeferenced image should show up on your map.
  18. Find a ground control point that doesn't line up as much as you would like.
  19. Delete the ground control point in the Georeferencer window.
  20. Add a replacement ground control point.
  21. Georeference it again—by default your georeferenced image will be overwritten, so change the destination in the georeferencer settings if you want to make a new file.

Part 2: Landsat imagery

Here we use the Semi-Automatic Classification Plugin to download Landsat imagery. Unfortunately, the process requires downloading a large amount of data. If the download ends up taking too long, use the data (landsat.vrt) in the landsat folder in today's data and skip to step 14.

  1. Open QGIS.
  2. Add an QuickMapServices base layer and zoom to a part of the world you're interested in.
  3. Install or enable the Semi-Automatic Classification Plugin.
  4. Go to SCP > Tools > Download Landsat.
  5. Find and click the Update Database button. This may take a few minutes, and you should see a status bar in the main QGIS window (not the plugin window).
  6. Set the Area coordinates:
    1. Under UL, click + and click the upper left point of thearea you'd like to map on your map view.
    2. Do the same for LR, but for the lower right point.
  7. Update the Aquisition date to only look for images from this year.
  8. Make the Max cloud cover 10%.
  9. Under Satellites, only select 8 OLI (Landsat 8).
  10. Click Find images. This may take a few minutes, and the main map view should have a progress bar while it works.
  11. Select one of the more recent images and click Display image preview to see a low-res preview of the image.
  12. Click on Download Options and select only bands 2, 3, 4, 5, 6, and 7.
  13. Ensure that only if preview in layers is checked and click Download images from list. Select a location for your downloads and wait a few minutes while it goes. You may want to grab a coffee.
  14. In the Semi-Automatic Classification Plugin toolbar, find a field that has RGB= before it. This sets which bands are represented in red, green, and blue on the screen.
  15. Set the RGB field to 3-2-1. This should be true color (red, green, and blue are set to red, green, and blue).
  16. Try setting the RGB field to 4-3-2. This makes infrared show up as red, so vegetation should be red.
  17. Find the Common Landsat 8 band combinations table on this page and try some out. You will need to subtract 1 from each band number as we did not load band 1.

Part 3: LiDAR imagery

  1. Open landcover.tif from today's data in QGIS. This is an extract of the city-wide landcover data available on the open data portal.
  2. Experiment with using the Sieve function: Raster > Analysis > Sieve, select a place to save and a threshold (say 100). This will make smaller clumps of pixels become part of their neighboring clumps of pixels.
  3. Right click on the original image, select Styles > Copy Styles, then paste them into the sieved layer (right click, Styles > Paste Styles).
  4. Build vectors out of the resulting raster. Go to Raster > Conversion > Polygonize and select a location to save to.
  5. In the vector layer use an expression to select only the paved areas (gray in the raster).