The short answer
A hillshade is a visualisation: it simulates a sun shining on the terrain and outputs a grayscale image whose values are brightness, governed by the light's azimuth and altitude. A slope raster is a measurement: it outputs the steepness of each cell, in degrees or percent rise, computed purely from elevation differences. You use hillshade to see the land and slope to measure it. The most consequential mistake in terrain work is reading a hillshade as if it were a measurement layer.
Both derive from the same DEM, but they answer different questions. Hillshade asks "what does the relief look like?" Slope asks "how steep is it here?"
How each is computed
Slope is the magnitude of the gradient of the elevation surface. For each cell, the algorithm fits a plane (or finite-difference gradient) across the 3x3 neighbourhood of elevation values and reports the maximum rate of change. It can be expressed two ways that are not interchangeable:
- Degrees: the angle from horizontal, 0-90.
- Percent rise: rise/run x 100, so a 45-degree slope is 100% — not 50%. Confusing the two units is a frequent error.
Slope depends on cell size, vertical units, and CRS, but not on any light source. Reproject a geographic DEM (EPSG:4326) to a metric CRS before computing slope, or set a correct z-factor, otherwise the degree/metre mismatch corrupts the values.
Hillshade computes a surface normal for each cell (from its slope and aspect) and takes the dot product with an illumination vector defined by azimuth and altitude, scaling the result to 0-255. Because the light direction is a free parameter, the output is inherently a styling choice. Change the azimuth from 315 to 135 degrees and the whole image can appear to invert; the underlying terrain has not changed at all.
The core distinction, made concrete
A hillshade can make a gentle landscape look dramatic and a steep one look flat, purely through the choice of altitude. Consider two cells with identical 20-degree slopes: one faces north-west, one faces south-east. Under a standard 315-degree/45-degree light, the north-west cell is bright and the south-east cell is dark — yet both are exactly 20 degrees steep. The slope raster reports 20 for both; the hillshade reports two very different brightness values. That is the entire reason you cannot classify steepness, risk, or constraints from a hillshade.
When to use which
Use hillshade to:
- reveal landform texture, drainage patterns, fault scarps, and geomorphic detail for interpretation;
- provide a base layer beneath thematic data so the map has relief context;
- communicate terrain to non-technical stakeholders.
Use slope to:
- threshold gradient (e.g. flag terrain steeper than 30 degrees for landslide screening or access constraints);
- feed quantitative models (erosion, runoff, suitability);
- classify terrain into gradient bands or combine with aspect and curvature for terrain units.
The two are routinely combined: drape a semi-transparent slope or thematic layer over a hillshade so the reader gets both the measured value and the relief context — but make the legend show which layer carries the numbers.
A worked example
You need to identify slopes over 30 degrees in a 5 m DEM for a road-corridor study.
-
Prepare the DEM.
gdalinfo dem.tifconfirms EPSG:25831 (metric) and metres vertical, so z-factor = 1. If it were geographic, reproject first:gdalwarp -t_srs EPSG:25831 -tr 5 5 -r bilinear dem.tif dem_25831.tif -
Compute slope in degrees (the measurement layer):
gdaldem slope dem_25831.tif slope_deg.tif -compute_edges -
Threshold it to the constraint:
gdal_calc.py -A slope_deg.tif --outfile=steep30.tif \ --calc="A>=30" --NoDataValue=0 -
Make a hillshade for context (the visualisation layer):
gdaldem hillshade -az 315 -alt 45 dem_25831.tif hillshade.tif -
Map both. Show
steep30(red) overhillshade(gray). The decision uses the slope-derived mask; the hillshade only situates it in the relief. In QGIS the same outputs come from theSlopeandHillshadeprocessing algorithms; in ArcGIS Pro from the Slope and Hillshade Spatial Analyst tools.
Common pitfalls and why they happen
- Classifying constraints from a hillshade. Because brightness tracks illumination, not steepness, a hazard map built on hillshade is invalid. It happens because the hillshade looks like it shows steepness. Always measure with slope.
- Confusing degrees and percent. A 100% slope is 45 degrees, not "very gentle." Mislabelling the unit doubles or halves perceived steepness. State the unit explicitly in the legend.
- Slope on a geographic DEM. Mixing degrees of longitude with metres of elevation yields nonsensical slopes. Reproject to metric or set the z-factor.
- Comparing two derivatives at different resolutions. A 30 m DEM gives gentler slopes than a 1 m DEM over the same hill, because coarser cells average out steep faces. Match cell size before comparing.
- Inverted-looking relief. Caused by a southern azimuth on the hillshade — a display issue that does not affect slope at all.
Validating the output
Spot-check slope values against a known feature — a surveyed cut, a contour-derived gradient, or a flat lake surface that should read near 0 degrees. Confirm the slope units in the layer metadata match the legend. For the hillshade, verify relief reads correctly at a recognisable valley and remember it is not subject to numeric validation because it carries no measurement. Above all, ensure any decision layer traces back to slope (or another measured derivative), never to the shaded image.
Bathyl perspective
We keep a hard line between the layer that shows terrain and the layer that measures it. Hillshade is the interpretive base; slope is the evidence you can put a number on and defend. Combining them is good practice, but only when the cartography makes clear which one the decision actually rests on.
Related reading
- Hillshade Azimuth and Altitude Explained
- Z Factor in Hillshade and Slope Analysis
- DEM Resolution for Terrain Analysis
- Why Your GIS Layers Do Not Line Up
- Terrain intelligence