Chapter 4 Terrain analysis
4.1 What is terrain analysis
-Analysis of topographic features (geomorphology)> For example
- Slope
- Aspect
- Hill shading
- Flow
- Insolation
Uses digital elevation models (DEM)
- Raster layer (i.e. pixels)
- Each pixel contains an elevation value
- DEMs vary in extent and resolution
There are many uses for terrain analysis. Hydrologists can use it to delimit watersheds and analyse flows. The layers derived from terrain analysis can be queried to produce information at points, along lines or within polygons. We can also carry out raster algebra operations on the layers.
How are DEMs produced?
- Traditionally made through interpolation between contours from a traditional map
- Now mainly through remote sensing involving some form of radar based sensor
- SRTM (Shuttle Radar Topography mission): Global extent 90m resolution
- Lidar (Light detection and ranging): Local extent, varying resolution
4.2 Lidar data
Raw lidar data consists of a point cloud of returns with some information regarding intensity
- First return: Top of vegetation or buildings
- Last return. Ground
Lidar point clouds can be processed using a range of different software. QGIS can be linked to LASTools. We will not process raw data in this class.
Source for Lidar data http://environment.data.gov.uk/ds/survey/index.jsp#/survey?grid=SY98
To see some point clouds open http://plas.io/
There are some point clouds of Arne on the server. Download them locally then open with plas.io.
4.2.0.1 Action: Note that this is not an obligatory exerise. It is to illustrate the concept of a poiint cloud interactively
- Click on this link http://r.bournemouth.ac.uk:82/Quantitative_and_Spatial_Analysis/Week_2/point_clouds/ in Firefox to open up the folder.
- Select one of the files. Download the file to your PC by write clicking and saving the target (this doesn’t work in INternet Explorer).
- Open up the plas.io window by clicking on the link to it http://plas.io/
- Now load the file using the browse button at the top.
- The result will be dark at first and you won’t see anything. Scroll down to find the intensity scaling and adjust this to a very narrow band on the left hand side until the cloud is visible. You will be shown this in the class.
- Experiment with other options to get a feel for the nature of the point cloud
- Zoom in and out and rotate the image with the mouse
http://r.bournemouth.ac.uk:82/Quantitative_and_Spatial_Analysis/Week_2/point_clouds/
4.2.0.2 Plos.io
4.3 Working with Lidar data in QGIS
The Lidar point clouds for both Hengistbury head and Arne have been already processed to produce the digital terrain model (ground) and digital surface model (top of vegetation and buildings). You have loaded the layers for Hengistbury head already and you should have saved them locally.
4.3.1 Analytical hill shading
Hill shading is a very commonly used technique, particularly in the field of Archaeology. It helps identify visible features as defined by their topography. As Lidar can penetrate forest canopies it can be used to identify Mayan ruins “lost in the jungle”.
Running the hill shading algorithm is very easy.
4.3.1.1 Action: Make a hill shaded layer from the DTM
- Click on the raster menu at the top bar.
- Select analysis.
- Select hillshade
- Choose the input layer. Use the DTM you have loaded (You can try the DSM later to see the difference)
- Keep the default options.
- Click run to produce a temporary file output IMPORTANT NOTE. All temporary files are just that. Temporary. This avoids building up lots of files that you may not eventually use. But you must save them before closing the program if you are going to keep them
4.3.1.2 This is the result.
You can now experiment with the technique by changing the parameters if you wish. Major changes away from the default settings will produce very ugly results, but small tweaks can help to show up features lit from different angles.
4.4 Colouring the DTM
The DTM and DSM layers are still showing in the project with a simple grey scale. We can colour them in with palettes in order to produce a clearer map.
4.4.0.1 Action: Colour the DTM using a single band “pseudocolour”
- Right click the layer in the layers panel to open the menu.
- Choose properties.
- Choose Symbology
- Select the render type to be “single band pseudocolor”
- Choose a colour ramp
- Apply the result to the map
- Move (or ensure that it is already) the result up in the layers panel so it is visible at the top.
- Move the hill shaded layer to be just below the shaded DTM
- Adjust the transparency of the top layer (right click the layer, find transparency in the properties window, move the slider) so that the map is transparent over the hill shaded layer.
4.4.0.2 Steps 1 to 3
4.4.0.3 Inverting the color ramp. (Click color ramp and choose invert)
4.4.0.4 Colouring the layer
4.4.0.5 Adjusting the transparency
4.4.0.6 This is the result.
4.4.1 Adding contour lines
We can make a vector layer of contour lines directly from the DTM. If you use the DSM then contours may be drawn around the edges of trees and forests, which could be useful for analysis in some cases, but may look odd.
4.4.1.1 Action: Make contour lines at 2m intervals
- Click on the raster menu on the top
- Scroll to “extraction”
- Choose contours
- Select the contour spacing
- Run the algorithm.
- You may wish to adjust they styling to alter the colour and width of the lines by right clicking to see the Properties menu, selecting Symbology and altering the options there.
4.4.1.3 The result
4.4.1.4 Zooming in
4.5 Calculating slope and aspect
4.5.1 Slope
Calculating the slope of hillsides is a basic operation in terrain analysis. More complex algorithms can use the slope layer in a range of applications, such as hydrological modelling (flows and watershed delineation) and insolation calculations. It is easy to produce a slope layer.
4.5.1.1 Action: Produce a layer showing slope in degrees
- Choose “analyses” from the raster menu at the top
- Select the slope option from the menu
- Select the DTM layer that will be used to calculate slope
- Run the analysis with default options to produce a new temporary layer.
4.5.1.2 Selecting the algorithm
4.5.1.3 Selecting the layer
4.5.1.4 The result
You may want to shade this layer using the styling options to select a pseudocolor ramp, as you did for the DTM.
4.5.2 Aspect
Calculating the aspect of each hillside leads to a layer that can be used as input to other analyses. It may be particularly useful for calculating insolation. South facing slopes will tend to be warmer and this may influence the distribution of organisms such as insects and reptiles.
4.5.2.1 Action: Produce a layer showing aspect in degrees
- Choose “analyses” from the raster menu at the top
- Select the aspect option from the menu
- Select the DTM layer that will be used to calculate slope
- Run the analysis with default options to produce a new temporary layer.
4.5.2.2 Selecting the layer
Again you may want to change the colour scheme on the layer.
4.5.2.3 The result
4.6 Calculating canopy height.
The difference between the DTM and DSM layers (first Lidar return and last Lidar return) is a measure of the canopy height in forests and even lower vegetation such as shrubland and heathland. You can produce a simple canopy height model through subtraction. To do this we use the raster calculator option.
4.6.0.1 Action: Produce a canopy height model
- Choose “raster calculator” from the raster menu at the top
- Type a name for the output layer into the box You could call it CHM for canopy height model
- Form the raster calculator expression by clicking on the first layer name i.e. DSM@1 ( the @ sign represents the first band, but there is only one band per layer) then the minus sign then the second layer. It should look like this “dsm@1” - “dtm@1”
- Run the calculator
- Shade the layer using a pseudocolor option
4.6.0.2 Running the calculation
4.6.0.3 The result
4.7 Investigating canopy height in 3D
You can use the qgis23js plug in to produce a three dimensional depiction of the canopy height by draping the coloured layer over the DSM.
4.8 Calculating raster stats for polygons.
It can be very useful to extract values from the terrain analyses and add them to vector layers. For example, you may want to find the slope, aspect, elevation etc. of some quadrats that you have placed in a study area. We will look at this again when carrying out field work at Arne. In the case of Hengistbury you may want to find the mean elevation, mean canopy height etc. of the area within each of the phase one polygons. You can do this using an option provided in the Saga tool kit.
4.8.0.1 Action: Add some derived statistics to the phase one polygons
- You will need some digitised polygons or polygons derived from another source.
- Activate the toolbox found under the processing menu at the top.
- Scroll down to the SAGA options.
- Find the option for “raster statistics for polygons” under the vector <-> raster menu heading.
- Select the grid(s) (Saga term for raster) that you will use by clicking the button on the right. The processing can be slow for large grids so just choose the CHM
- Choose the vector (polygon) layer you will use as an overlay.
- Select the statistics you want to calculate. Just choose the ones you actually need, as the process can be slow. Say, for example, minimum, mean and maximum canopy height.
- Press run and wait for the analysis to finish. This can take a while and could possibly hang if the layers are very large, as this is quite a complex operation.
- Open the resulting layers attribute table to see the results.