Download PDF

## Digital Elevation models

Our georeferenced maps contain color information. But often, bitmap layers in GIS contain arbitrary data. Digital elevation models (DEM) are a typical example. In our case, each pixel contains a number indicating the meters above sea level. We can use DEMs for all kinds of calculations.

1. Load boston_dem.tif from our GIS package (in raster > elevation). You should see a dark, pixelated silhouette of Boston.

2. In the Layer properties window (double-click on the layer), you can change how the raster data is mapped to colors. Try choosing instead of singleband grey Paletted/Unique values, then select a color ramp and click classify. Each unique value in the raster is now mapped to a part of a color ramp.

3. You now can change the ramp e.g. by deleting all classes with negative numbers. What change do you observe?

4. Now let’s proceed to delete the classes for 0 - 3. All areas lower than 4 meters above sea level become transparent.

5. Some other things we can do:

6. We can use the DEM to calcuate contour lines with Raster > Extraction > Contour ...

7. We can generate new raster layers that carry the result of calculations on our raster layer using Raster > Raster Calculator. We can, for example, generate a new layer that only contains information about areas above a certain elevation, which is useful e.g. for sea level rise models.

## First, we will work with a map that is already georectified.

1. Go to [https://collections.leventhalmap.org/georeferencing], select “georeferenced maps”. This link should take you straight there. Choose a property map using the subject headings.
2. First use a geo-referenced map. download the GeoTIFF (georeferenced) format. Note that this will be big!
3. use open street map as a base layer. if not available, go to XYZ Tiles in the browser tab, right-click, select New Connection then make a OSM connection with the URL http://a.tile.openstreetmap.org/{z}/{x}/{y}.png. you can then drag that into your layer tab.
4. add the GeoTIFF as a layer (either drag&drop or in the menu Layer > Add Layer > Add Raster Layer)
5. right-click on this raster layer, select Zoom to Layer.
6. You can also add an Opacity widget: double-click raster layer, select Legend on the left side, add Opacity Slider widget.

(If you have time)

Download a vector file from the sources we explored last week and overlay it on this map.

## Now, how to georeference a map.

1. Go to https://collections.leventhalmap.org/georeferencing, select “Maps available to georeference”
2. Download a map, JPG is ok. you can try for example this one.
3. in QGIS3, you need to load the georeferencer plugin. Go to Plugins > Manage and Install Plugins > Installed, check Georeferencer GDAL. You can select it now from the Raster menu, an extra window will pop up.
4. Here you can load the bitmap, select points on the scanned map, and then select the points on the GIS canvas (another popup will open). The process is a bit convoluted, but you will figure it out. You then can select transformation and file output options (it will be a GeoTIFF), and press the start button in the georectify window.
5. Important! Georeferencing will only work correctly if you use the same CRS for the file than the one you pick your coordinates in (the project CRS). if in doubt, use WGS 84 for both!
6. Best practice for georeferencing: don’t try to select corners of buildings etc. for georeferencing. Pick the center of street intersections at the edges of the map.

## Finally, create your own vector data from a raster map

1. Keep your current layer loaded.
2. Menu "layer" -> "New Layer". This will be a polygon layer.
3. Right-click or control click on the layer for “toggle editing.”
4. Click the green object with the ‘add star.’.
5. Draw around a polygon; trace and save it. (Be 100% sure you save your changes–students have lost work on previous versions).
6. Looking at these fire insurance maps: with your neighbors, make a list of what attribute fields you’d like to include.