This section regards
Digital Elevation Model
(DEM), Digital Surface Models (DSM) and we will expand your knowledge of QGIS.
1. Theory
1.1 DEM and DSM
DEMs and DSMs are digital representations of the surface of the Earth. A DEM contains only the elevation, not any features on the ground
(natural or human-made). This is the difference to a DSM, which contains any surface features (trees, houses, etc.).
Here and
here
you can read more on the differences.
1.2 Raster data
DEMs are usually in a format called "raster data" (
raster basics,
raster data, and
more raster data).
In short, a raster is like a table with a certain number of rows and columns. Each field contains a number, for example the
height a.s.l.
The main advantages of using raster data sets regard faster calculation processes, presenting a continuous surface and surface analysis. The main disadvantage is that surface structure can be lost if the resolution is not sufficient. The advantages/disadvantages are compared to vector data sets, which we will use later.
Practical exercise
Let's work with some raster data in QGIS. For example, we can use two different DEMs to have additional height information to our web services.
2.1 Preparations
Have you heard of the Norwegian Polar Institute? Sure. Let's visit their
data centre
again. As a search entry, use "Svalbard DEM" and select "Merged NPI-ArcticDEM Svalbard digital elevation model." Download the zip file (it is about 3 GB).
This is an improved version of the
ArcticDEM
, a DEM with a 2 m resolution of the whole Arctic. It's all for free, isn't that great? Once downloaded, please unzip the file.
2.2 Loading into QGIS and settings
Open your project.
1) In the top menu, select "Layer -> Add layer -> Add raster layer." |
 |
2) Click on the three little dots on the right side under "Source," navigate to and select them to download the DEM. Press "Add" and close the menu. |
 |
3) The DEM will be loaded to your project. As the file is 3 GB, it may take a while. It should look like this: |
 |
To zoom to the DEM, right-click on the name in the Layers section and choose "
zoom to layer." This is a very handy function if you can't find your data. Believe it or not, it happens all the time. The name of the file is a bit impractical and would also show later as-is in our map, so let's rename it. Right-click again on the name, choose "Rename layer" and choose something more practical (e.g., "Svalbard DEM"). Delete the Layers entry of the OpenStreetMap and replace it with the Orthophoto layer from NP.
Save your project. Remember to save regularly because GISs like to crash, and restarting a GIS solve about 50% of all problems. Once saved, use the zoom function to zoom to Longyearbyen. If you can't find it, you can add one of the online sources above the DEM. Use it to find the right spot and unlock this little hook next to the name. It should only show you the DEM again. If you have a not-so-good computer, this might be a not-so-good idea.
If you double-click on the name of the DEM, you are transported directly to the properties of the layers, which you can also choose by right-clicking on the name and the select "Properties." You will spend a lot of time in this menu. We will talk now about the first 4 entries.
1) These are
Information: Most important here is the path to the source of your data set. Click on it to open the folder. You can also change the path here in case you moved your data set to another location.
Source: Shows you the display name and the assigned coordinate reference system. You can change it here on this little globe on the side.
Symbology: This describes how your layer looks on the canvas (and thus later in your map).
Transparency: Here you can add transparency to your layer. A very handy feature if you want to overlay different data sets. |
 |
2) Zoom to the Longyearbyen area. Let's play with the symbology. Set the "Render type" to
"
Hillshade"
and press Ok. Look at the result.
"Singleband gray" and press Ok. Look at the result.
"Singleband pseudocolor" and press Ok. Look at the result.
|
 |
3) Go back to the properties -> Symbology, as we will work a bit with this now.
- Change the min-value to 0 and the max-value to 1100. Press "Apply." Instead of stretching to the min/max of the entire dataset, we set it to 0-1100 m. Why? Because we look at the Longyearbyan area and we know the area has a height range between 0 m (sea level) and 1051 m (Nordenskiöldtoppen). With this step, we stretch the colour range to our area of interest.
- There are two things now, that are not so nice.
- The first one regards the precision. You can see that the accuracy in metres is given with 4 digits. In this case, we can use 0 for this, as we are looking into a rather large range. Please set the label precision to 0 and press apply. It looks much nicer in our future legend. Plus, we don't imply a precision we don't have.
- The second one is the changing differences between each step (colour). Right under the colours, you can find the "Mode." Please set it to equal intervals. Press apply.
- To the right of "Mode," you can find "Classes." We leave it now at 5 classes, but you can change the number of classes here. You can also add classes on the green plus and delete a class on the red minus.
- If you want to change the values for each class manually, you can click on the double-click value and edit it. This works in the same way for the colours and the Label (the label is what you can see in the layers section and what is later shown in the map.
- Usually, height a.s.l. is not given in a red colour scheme. Let's select another colour ramp. Click on the little down arrow and choose "grays" and press "Apply." You see here is a lot of other options, e.g., inverting the ramp. You can customize your colour ramp by clicking on the ramp, not on the arrow. As you can see, you can customize every little thing.
- Under Interpolation, select "Discrete." Look at the change. Now you have hard changes instead of a smooth one.
|
 |
2.3 Subsets of data
The DEM we use is rather large. Let's produce a subset to free up a bit of computing capacity.
1) Right-click on the DEM-name -> Export -> Save as |
 |
2) In this menu, select a file name and under "Extent," choose "Map canvas extend." This will choose size-wise what you can see right now. You can change that to specific coordinates or the extend of another layer. Set the resolution to Horizontal 20 and Vertical 20. Press "OK."
Now you can remove the large DEM and only use the small DEM. This is optional. |
 |
A job well done. Let's see what happens on the next page.