Terrain analysis

What is terrain analysis?

  • Analysis of topographic features (geomorphology)
    • Slope
    • Aspect
    • Hillshading
    • Flow
    • Insolation

What is terrain analysis based on?

Digital elevation model (DEM)

  • Raster layer (i.e. pixels)
  • Each pixel contains an elevation value
  • DEMs vary in extent and resolution

What is terrain analysis used for?

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 alegebra operations on the layers.

How are DEMs produced?

  • Traditionally 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

Processing Lidar

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, but you can get some information on how this is done here.

https://rpubs.com/dgolicher/lidar

Processing Lidar

Point clouds

To see some point clouds open http://plas.io/

Here are some point clouds of Arne. Download them locally then open with plas.io.

http://r.bournemouth.ac.uk:82/Quantitative_and_Spatial_Analysis/Week_2/point_clouds/

Load the point cloud and look at it

Load the point cloud(s) of Arne on the server into plas.io and adjust the settings in order to visualise it (narrow the intensity scaling to brighten). Each point has a X, Y, Z values and other attributes. The points may be located anywhere in space are not aligned within any particular grid This will give you a feel for the nature of a point cloud, but you can't do much with it directly.

Processing a lidar point cloud

Processing the point cloud (not conducted in this class) leads to the production of two very useful raster layers.

  • Digital surface model (DSM)
  • Digital terrain model (DTM)

Digital surface model

The digital surface model is obtained by smoothing the first returns in order to produce values for a two dimensional (x and y) raster grid placed on the point cloud. The third dimension is now the value of the pixel. The resolution can be chosen when producing the model. it can't be finer than the typical gaps between points, but it can be coarser.

Digital terrain model

The digital terrain model is obtained by smoothing the last returns with some interpolation techniques included to smooth around hard surfaces in order to produce values that should correspond to the ground surface. In cities and towns this will be more challenging than in areas with vegetation, as returns from the actual ground may be difficult.

QGIS

QGIS is similar to ArcGIS in many respects. There are some differences in the look and feel of the interface, but most files produced in QGIS can be loaded into ArcGIS and vice versa. QGIS is Open Source (i.e free) and can be downloaded and installed on your laptop from here

http://www.qgis.org/en/site/forusers/download.html

The version currently installed in the PC labs is QGIS 2.14. You should install the same version on your laptop.

QGIS Browser

The QGIS browser panel plays the same role as Arc Catalogue. You will see icons to connect to a range of data services, including PostGIS and Geoserver. The Geoserver options are WFS, WMS and WCS (OWS shows all open web services)

Connecting to the geoserver

Raster files can be obtained from the Geoserver for terrain analysis by opening a WCS connector in the QGIS browser panel

http://r.bournemouth.ac.uk:8083/bu/wcs?

Or (on campus only)

http://172.16.49.31:8083/bu/wcs?

Connecting to the geoserver

What is WCS?

WCS stands for Web Coverage Service. This serves up the actual raster values from the server. WMS (Web Map Service) only provides an image of the raster without the values. WMS is faster but of no use for terrain analysis. You can't modify or process WCS layers unless you save them locally. You can easily clip large layers stored on the server to specific areas of interest, save them to your project and then work on them either in QGIS or in Arc. We'll do that first.

Connecting to the geoserver

Once connected you can just click on the layers to bring them into the QGIS canvas. Note that if you are not zoomed to a specific area the whole layer will be loaded. The SRTM is for the UK, so if you want to load this coarse resolution layer (which we will not use in the class) do it after loading the layers for Arne. As you zoom out more of the layer will be loaded, which may take some time with a WCS layer

Pull the DTM and DSM layers onto the canvas

Right click on the layers you want to save locally

Save locally

Go to the save as option. You'll notice that you can choose to save the whole layer (layer extent button) or the map view extent. If you zoom to the specific area you want to work with you can choose this option, and you will see the numbers change in the boxes showing the extent.

Save locally

Save the file as Geotiff with a slightly different name to to WCS name to avoid confusion. Then you should then remove the WCS layers, as you now have the data locally and leaving the WCS connection will slow down zooming and panning and cause confusion as it looks identical.

FInd save as

Choose map view extent after zooming to your area.

Make sure you add the new layer to the canvas.

Remove WCS layers

Repeat for DSM

Be careful not to accidentally change the map view extent by zooming in between the two saves (or your two layers may not match in extents)

Colouring

You can colour your DTM or DSM in various ways. The quick way is to select single band pseudocolour (go into properties by right clicking on layer), select a palette and classify the layer.

Colouring

Terrain analysis

We are now ready to derive some more layers from the DTM (you can also use the DSM, but think about what slope and aspect would mean in this case). Click on the raster menu on the top of the window, go down to analysis and the last option on the sub menu shows DEM (Terrain models). You can then run a range of analyses that produce new derived layers including Hillshade, slope and aspect.

Hillshading

Hillshading can be used as a visual tool to identify features. It also makes the map look nice! Try producing a hillshade using default options. Notice that QGIS actually uses the command line program gdal to do this. A line is shown at the bottom which could be used in an automated script. E.g.

gdaldem hillshade arne_2m_dtm.tiff hillshade.tiff -z 1.0 -s 1.0 -az 315.0 -alt 45.0 -of GTiff

Hillshade menu options

Save new layers locally and make sure you add them to the canvas.

Set the hillshade transparency

The result

Zooming in

Practical work

You should now be able to produce several additional layers for Arne using the terrain analysis tools in QGIS (or in Arc). Try subtracting the DTM from the DSM in order to produce a vegetation height layer. In QGIS the raster calculator is fairly intuitive.

Qgis23js

Next steps

Once you have compiled a set of useful layer derived from the DSM and DTM we will look at how these can be used within the context of quantitative data analysis, in addition to producing spatial visualisations.