Short answer
A DEM and a geological map become useful together once they share a projected CRS and you read the terrain as evidence rather than backdrop. Reproject both to the same metric CRS, build a hillshade with gdaldem hillshade, drape the geological polygons at 40-60% opacity (or multiply blend) over the relief, and then use slope, aspect, and profile curvature to test whether the mapped contacts, dips, and faults are consistent with the landforms. Differential erosion means the geology is often written into the topography, so the DEM is both a registration check and an interpretation tool.
Get the alignment right first
The fastest way to waste a day is to overlay a geology layer that "almost" lines up. Three things must agree:
CRS. Put both datasets in the same projected, metre-based CRS (e.g. the appropriate UTM zone, EPSG:326xx/327xx, or a national grid). If the geology is in geographic WGS84 (EPSG:4326) and the DEM in UTM, on-the-fly reprojection may align them on screen but distance- and slope-derived products will be wrong. Reproject the geology with proper datum handling:
ogr2ogr -t_srs EPSG:32633 geology_utm.gpkg geology_wgs84.gpkg
gdalwarp -t_srs EPSG:32633 -r bilinear -tr 30 30 -tap dem_wgs84.tif dem_utm.tif
The -tap (target-aligned pixels) flag keeps the grid on clean coordinate boundaries so later raster math co-registers cleanly.
Vertical units vs horizontal units. Slope and curvature divide elevation differences by horizontal distance, so the DEM's Z unit (metres) and the horizontal unit (metres) must be consistent. A DEM in geographic degrees fed to a slope algorithm produces nonsense unless the tool applies a scale factor (gdaldem slope -s 111120 is the common degrees-to-metres kludge, but reprojecting to metres is cleaner).
Resolution and snap. When you stack derivatives (slope over geology, curvature over slope) they should share cell size and origin. Resample with gdalwarp -tr and -tap rather than letting the GIS guess.
Choosing a DEM for the mapping scale
Match DEM resolution to the map scale and the question:
- Regional context, 1:100,000-1:50,000: SRTM 1-arc-second (~30 m), Copernicus GLO-30 (30 m), or ASTER GDEM. Copernicus GLO-30 is generally cleaner than SRTM (fewer voids, better in steep terrain).
- Detailed structural / unit mapping, 1:10,000-1:25,000: 5-10 m national DEMs where available.
- Fault scarps, landslide scars, microtopography, 1:5,000 and finer: 1-2 m airborne lidar DTM (bare-earth), not a DSM. The DSM includes canopy and buildings and will create false breaks at field boundaries and tree lines.
Higher resolution is not automatically better. A 1 m DEM over forested terrain carries vegetation artefacts and tractor-line noise that swamp the geological signal; for landform-scale interpretation a smoothed 10-30 m surface can be more legible.
Draping geology on relief
Hillshade is the workhorse base. Generate it and pick an azimuth that does not run parallel to the dominant structural grain (otherwise structures parallel to the light vanish):
gdaldem hillshade -az 315 -alt 45 -z 1.0 dem_utm.tif hillshade.tif
Standard practice is azimuth 315° (NW) and altitude 45°, but for strongly lineated terrain compute a second hillshade at 045° and blend, or use a multidirectional hillshade (gdaldem hillshade -multidirectional) to avoid azimuth bias. In QGIS, put the geological polygons above the hillshade and set the polygon layer blending mode to Multiply or fill opacity to ~50%; the relief then reads through the unit colors. Add the hypsometric (elevation-colored) DEM beneath the hillshade at low opacity if absolute elevation matters.
Reading structure from the DEM
This is where the DEM stops being decoration and becomes data.
- Dip and strike from V's and dip slopes. Where a resistant bed crops out across a valley, the outcrop trace forms a "V" pointing in the dip direction (rule of V's). Dip slopes appear as smooth planar hillsides whose gradient approximates true dip; the opposite scarp slope is steeper. You can sanity-check mapped dip readings against the terrain directly.
- Faults and lineaments. Linear breaks in slope, offset drainage, aligned saddles, and triangular facets show in hillshade and especially in a slope raster (
gdaldem slope). Compute slope and look for sharp linear gradient discontinuities crossing lithological grain. - Lithological contrast. Differential erosion means a slope or profile curvature raster often outlines map units before you draw a single contact — resistant quartzites as convex ridges, shales as concave swales.
- Drainage control. Trellis drainage suggests folded layered rocks; rectangular drainage suggests joint/fault control. Derive a flow accumulation network (QGIS
r.watershed/ SAGA, orgdaldemplus channel extraction) and compare its geometry to the structural map.
A practical derivative stack: hillshade (base), slope (structure), profile curvature (lithological breaks), and a 50-m contour set for absolute reference.
Worked example: testing a mapped contact
Say a 1:25,000 sheet shows a sandstone-over-shale contact running NE-SW. To test it:
- Reproject sheet and a 10 m DEM to the same UTM zone with
gdalwarp -tap. - Build slope and multidirectional hillshade.
- Overlay the contact on slope. If the contact is real and the sandstone is resistant, the slope raster should show a consistent break — gentle dip slope above, steeper face below — tracking the mapped line.
- Extract an elevation profile across the contact in QGIS (Profile Tool / Terrain Profile). A clean inflection at the contact supports it; a profile that crosses the line with no morphological signature is a flag to re-examine the field evidence or the digitizing.
This turns the DEM into an independent referee for the map.
Common pitfalls and why they happen
- Slope computed on a geographic DEM. Degrees ≠ metres, so gradients are meaningless. Happens because the file "works" on screen. Reproject to a metric CRS first.
- Using a DSM as if it were a DTM. Canopy and buildings create false scarps and break drainage extraction. Always confirm bare-earth.
- Single-azimuth hillshade hiding structure. Lineaments parallel to the light source disappear. Use multidirectional or two-azimuth blends.
- Over-trusting high resolution. 1 m DEMs in cultivated/forested terrain encode noise that mimics geology. Smooth (low-pass / Gaussian) or step down to a coarser DEM for landform reading.
- Edge and void artefacts. SRTM voids and stripe noise propagate into derivatives. Fill voids (
gdal_fillnodata) before deriving slope.
Validation checks
- Overlay a known control feature (a quarry face, a gauged stream, a surveyed benchmark) and confirm the DEM elevation matches the record within the DEM's stated vertical accuracy.
- Toggle the geology off and on rapidly; mapped contacts should fall on real terrain breaks far more often than chance.
- Re-run a key derivative at a coarser resolution; if conclusions flip, your signal may be resolution-dependent noise.
- Document DEM source, acquisition date, vertical datum, and cell size alongside the map — terrain changes (landslides, mining, erosion) mean an old DEM may no longer match current geology.
Bathyl perspective
We use the DEM as a second opinion on the map, not a pretty base layer. When a derived terrain product and a mapped contact disagree, that tension is exactly the thing worth investigating, and it is the fastest route to a map a reviewer can defend.
Related reading
- Building a Terrain Layer Stack
- DEM Sources for Early Project Screening
- Slope, Aspect, and Hillshade From DEM Data
- Why Your GIS Layers Do Not Line Up
- Vertical CRS for Elevation Data
- Terrain intelligence