From DEM to Slope, Aspect and Hillshade
Slope, aspect and hillshade are where almost every terrain workflow begins — landslide susceptibility, solar siting, trail design, agricultural suitability. The first obstacle is usually simpler than the analysis: where do you get a DEM? This guide covers where to obtain elevation data, how to derive slope and hillshade from it, and how resolution quietly changes your answer.
What a DEM is
A DEM (Digital Elevation Model) is a raster whose cell values are heights rather than colours. Think of an image where every pixel holds metres above sea level.
Three similar acronyms cause most of the confusion:
| Term | What it represents | Buildings and trees? |
|---|---|---|
| DEM | Digital Elevation Model — the broadest term | Depends on the dataset |
| DTM | Digital Terrain Model — the bare ground | Removed |
| DSM | Digital Surface Model — the visible surface | Included |
Slope and hydrology work needs a DTM — tree canopy should not register as terrain. Shadow and solar-potential studies need a DSM instead. Most free global DEMs behave more like a DSM, which means they read high over forest.
Free DEM sources
| Dataset | Resolution | Coverage | Notes |
|---|---|---|---|
| Copernicus DEM (GLO-30) | ~30 m | Global | Most consistent quality of the global products |
| SRTM | ~30 m | 60°N to 60°S | Longest track record, most documentation |
| ASTER GDEM | ~30 m | Global | Local noise from cloud contamination |
| ALOS AW3D30 | ~30 m | Global | Comparatively good in mountainous terrain |
| National mapping agency data | 1–5 m | Varies by country | Far more precise, usually requires registration |
Slope — decide the unit first
Slope is expressed two ways, and mixing them produces very different numbers.
- Degrees — 0° to 90°. The usual choice in terrain analysis.
- Percent — metres risen per 100 metres travelled horizontally. Standard in road and rail design.
The trap is that 45° equals 100%, not 90°. People regularly read 100% as vertical. Whenever a regulation specifies a slope threshold, confirm which unit it means before you classify anything.
| Degrees | Percent | Feels like |
|---|---|---|
| 5° | 8.7% | Gentle farmland |
| 15° | 26.8% | Around the limit of cultivation |
| 25° | 46.6% | Steep; landslide risk rises |
| 45° | 100% | Very steep |
Hillshade is presentation, not analysis
Hillshade simulates a light source and shades the terrain accordingly. The important thing is that it is an image, not a measurement. You do not compute with hillshade; you place it under other layers to give them relief.
The conventional defaults are azimuth 315° (north-west), altitude 45°. Lighting from the upper left matches how the eye expects illumination to fall. Light the scene from the south-east instead and valleys read as ridges and ridges as valleys — the classic relief inversion illusion.
Step by step: from DEM to terrain analysis
- Define the extent — draw it on the map or load a boundary polygon. Request slightly more than you need; edge pixels are unreliable.
- Download the DEM for that extent.
- Derive slope, aspect and hillshade — all three come from the same DEM. Choose the slope unit before you start.
- Classify into bands — raw slope is hard to read. Reclassifying into ranges (0–5°, 5–15°, 15–25°, above 25°) makes area tabulation straightforward.
- Export — add to the map or save as GeoTIFF.
When the result looks wrong
- Slope is near zero everywhere — the vertical and horizontal units disagree. This is the classic symptom of computing slope while the DEM is still in geographic (degree) coordinates. Reproject to a metric CRS first.
- Visible grid striping — tile seams or quantisation in the source DEM. Light smoothing before analysis reduces it.
- Strange values over water — NoData was never assigned. Mask water bodies before computing.
- Edge pixels spike — slope is derived from the eight surrounding cells, so the outermost row and column cannot be trusted. Download a buffer and clip afterwards.