Working with Height data
Last updated
Last updated
Elevation data is an important part of field mapping.
Here, you will learn more about what you can do with Digital Elevation Models, contours and hillshades in QGIS.
Digital Elevation Models (DEMs) across Antarctic vary in spatial resolution and coverage. Today, we'll be looking at the Reference Elevation Model of Antarctica (REMA), which is at 8m resolution.
As DEMs are generally large files, most providers allow uses to download a smaller section, or "tile."
Here, we're only looking at two tiles. Please load the following files in to QGIS:
39_11_8m_dem
39_12_8m_dem
It should look like this:
Notice how QGIS zooms straight to your data? Let's add a coastline file, so we know where we're looking at:
We have two tiles, but it would be good to have one larger one so we can perform some analysis. Let's use the Merge tool for this:
Go to the Processing Toolbox - either from the top menu, or at the side panel
Search "Merge"
Select your DEM files as the Input
Choose where to save your final product (leave this blank to make a temporary layer that will not be saved)
Now you have one DEM file!
Sometimes, you want to use multiple tiles without having to save a new file - this lets you save space on your PC/drive. To create a virtual raster:
Access the Create Virtual Raster tool by going to the Raster toolbar ➤ Miscillaneous ➤ Build Virtual Raster
2. Click the ...
button beside Input Layers and select the rasters you want to combine
3. Choose "Highest" in the Resolution Drop-down
4. Click Run
This will result in a new Virtual Raster, containing the tiles you have selected. In this case, we have used the two REMA tiles from previously.
You can see which data is a Virtual Layer in the Layer Tree - it as a symbol beside the Layer Name - see what we mean below:
Hillshades are a really useful way to visualise a DEM. To create a hillshade:
Access the Hillshade tool from Raster ➤ Analysis ➤ Hillshade.
Most of the parameters will not need to be changed
Alter the Z factor as required
Make sure you save the file somewhere (in the box where it says [Save to a temporary file] - click the ...
to the right of the box, and select 'Save to File')
It should default to .tif
format which is good for this use
2. Click Run. This might take a minute or 2, and then your hillshade should appear in your Layers panel.
Contour generation is pretty straightforward in QGIS, but there can be issues when there is missing data (such as in this example!)
Go to the Processing Toolbox, and search for "Contour"
Select the Tool under GDAL -> Raster Extraction:
Once you've selected the Contour tool:
Select your Merged DEM as an Input
Choose where to save it (leave this blank to make a temporary layer that will not be saved)
Choose a Contour Interval of 100
At the moment, your contours probably look like this:
In order to make some sense, it's useful to Style contours using Index Contours. This can be done in the Properties -> Style Panel.
We need to Filter the lines by whether they are a multiple of a number. In this case, as the interval is 100m, a 500m Index contour would be good.
Contours provided by MAGIC will usually already have this step done for you. Please ask MAGIC if you need any help!
Open the Symbology Tab in the Layer Properties (double-click the layer name in TOC)
Select "Rule-based" symbology
Double-click on the line symbol. It will open an "Edit Rule" box
Name your Rule : "Index Contour"
In Filter, type: "ELEV" % 500 = 0
Style your line. We generally use blue for the polar regions, and make the index line thicker than the normal contour.
"ELEV" is the Attribute Field in your Contours layer
500 is your Index Contour interval
Now you've got your index contours, done, you need a rule for the rest of the lines. This is pretty straightforward:
Click the "+" symbol at the bottom of Rule Panel
Label the Rule "Contour"
Click "Else"
Style as before, but make sure the line thickness is less than the index contour.
You should now have something that looks like this!
Labelling all the contours would make the map really cluttered. We're going to Filter the labels, by only labelling the Index Contours.
Select the "Labels" tab in Layer Properties
Choose "Rule-based Labelling"
Create a Rule:
Name it "Index Contour Labels"
Use the same filter as the Contours: "ELEV" % 500 = 0
Select the field you use to label the lines - in this case, "ELEV"
Style your label - make sure your Placement settings are "Curved" or "Parallel" and you have the "On Line" option ticked. We also add a Mask so you can read the lines clearer.
Now you should have something like this: