Creating an elevation hillshade

A hillshade, or shaded relief, is a technique to visualize elevation data in order to make it photorealistic for presentation as a map. This capability is part of GDAL and is available in QGIS in two different ways. It is a tool in the Terrain Analysis menu under the Raster menu, and it is also an algorithm in the Processing Toolbox.

Getting ready

You will need to download a Digital Elevation Model (DEM) from https://github.com/GeospatialPython/Learn/raw/master/dem.zip.

Unzip the file named dem.asc and place it in your /qgis_data/rasters directory. A DEM is a 3D representation of a terrain's surface.

How to do it...

In this recipe, we will load the DEM layer and run the Hillshade processing algorithm against it. To do ...

Get QGIS Python Programming Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.