Digital Elevation Model (DEM) Processing

From AWF-Wiki
Revision as of 14:52, 12 April 2018 by Hfuchs (Talk | contribs)

Jump to: navigation, search
In this article you will learn how to pre-process and enhance digital elevation model (DEM) data, as well as how to create a 3D-Model

Contents

Loading and reprojecting DEM data

  • Add a ditial elevation model as raster layer n51_e009_e0010_merge.tif to a new QGIS project (from geodata\raster\).
  • In the search engine of the Processing Toolbox, type warp and select Warp (reproject) under Projections of GDAL.
  • Under the Parameter tab, select the dem file as input layer.
  • Select EPSG:4326 (WGS84 / Long Lat) under the Source SRS tab.
  • Select EPSG:32632 (WGS84 /UTM Zone 32 N) under the Target SRS tab.
  • Enter 30 as the output file resolution in meters.
  • Select the Resampling method bilinear.
  • Specify the Path and name of the output file.
  • Click on Run to execute the algorithm.

Qgis warp srtm.png

Clipping of DEM data

  1. Create a boundary polygon
    • Add the raster map geodata/raster/s2/Subset_S2A_MSIL2A_20170619T
    • Select Vector --> Research tools --> Polygon from layer extent. Choose the Sentinel-2 map as input, select an output path and file name and confirm with OK. Confirm the following prompt to let the layer be added to the canvas (figure C).
  2. Buffer the boundary polygon
    • Choose Vector --> Geoprocessing tools --> Buffer and select the boundary polygon created before as input. Select a reasonable name and output directory under Output shapefile. Confirm with OK and let the output layer be added to the canvas. Place it below the boundary polygon in the TOC to see the effect of buffering.
  3. Clip the DEM map
    • Open the clipping tool under Raster --> Extractions --> Clipper. Select the reprojected DEM file as input and select the output directory and file name as usual. Select the Mask layer radio button to select the buffered boundary layer as blueprint for clipping. Don't forget to enter an output path and file name. Confirm with OK and let the result be added to the map.
  4. Map visualization
    • Open the raster layer properties by right-clicking the clipped DEM map in the TOC and selecting Properties, or by simply double clicking.
    • Select the Style tab. Under Render type select Singleband pseudocolor.
    • In the Generate new color map section select Spectral. In the Mode pulldown menu select Continuous. Set the number of Classes to 20 and click Classify.
    • To finish, click Apply. If your're content with you settings, click OK to close the window (figure D).
Figure C: Boundary polygon produced by polygon to layer
Figure D: Clipped DEM map displayed in pseudocolor

Shaded relief layer styling

  1. Add a digital terrain model layer.
  2. Right click on the layer name and then click Duplicate from the menu
  3. Open the layer settings menu. Go to Style and change the render type to Hillshade and press OK
  4. Right click on the duplicated file copy and open the layer settings menu.
  5. Change the render type to Singleband Pseudocolor and select new color ramp. Select the color ramp type cpt-city. OK.

You'll find many more selections of color ramps sorted by theme. Select one (e.g. Topography > elevation). OK.

  1. Change Blending mode under Color rendering to Burn.
  2. Change layer transparency to 30%.
Figure E: Hillshade
Figure F: Pseudocolor topography style
Figure G: Colorized hillshade


Computing hillshade, slope and aspect

  • Raster --> Analysis --> DEM (Terrain...)
  • Add the reprojected DEM (WGS84 /UTM Zone 32 N).
  • Select this dem file as input layer.
  • Specify an output file hillshade.tif.
  • Choose the mode Hillshade. OK.

Qgis analysis hillshade.png Qgis goe hillshade.png

  • Switch mode to Slope.
  • Check Slope expressed as percent.
  • Specify a new output file slope.tif. OK.

Qgis analysis slope.png Qgis goe slope.png

  • Switch mode to Aspect.
  • Specify a new output file aspect.tif. OK.

Qgis analysis aspect.png Qgis goe aspect.png

Trafficability slope classes

The following classification scheme for slope is given:

       Code    Slope[%]
       1        0- 5
       2        5-20
       3       20-30
       4       30-45
       5         >45
  • Add slope as raster layer
  • In the search engine of the Processing Toolbox, type reclassify and select Reclassify values (simple) under Raster Tools of SAGA.
  • Under the Parameter tab, select the slope layer as Grid.
  • Select [2] Low value <= grid value < high value under the Replace condition tab.
  • Enter the fixed table as shown below.

Qgis reclassify slope.png Qgis goe slopeclass.png

  • Specify path and name of the output file.
  • Click on Run to execute the algorithm.
  • Render the changed grid with type Singleband Pseudodocolor color ramp.
Personal tools
Namespaces

Variants
Actions
Navigation
Development
Toolbox
Print/export