11.2 Slope, Aspect, and Curvature
First and second derivatives of elevation — steepness, direction, and local curvature.
Key takeaways
- Slope and aspect are the first spatial derivatives of elevation.
- Curvature is the second derivative — profile, plan, and mean.
- These derived rasters feed everything from agriculture to landslide modelling.
Introduction
Given a DEM, the simplest analytic products are slope and aspect — the first derivatives in height with respect to position. Together with curvature (second derivative) they describe the local geometry of the terrain and underpin huge amounts of downstream analysis.
Slope
Slope is the rate of change of elevation with horizontal distance, expressed in degrees (0–90) or percent (rise/run × 100).
Compute via central-difference over a 3×3 window:
$$\frac{dz}{dx} = \frac{z_{i+1,j} - z_{i-1,j}}{2 \Delta x} \quad \frac{dz}{dy} = \frac{z_{i,j+1} - z_{i,j-1}}{2 \Delta y}$$
$$\text{slope} = \arctan \sqrt{(dz/dx)^2 + (dz/dy)^2}$$
In tools:
gdaldem slope dem.tif slope_deg.tif -compute_edges1from richdem import TerrainAttribute, rdarray
2slope = TerrainAttribute(rdarray(dem, no_data=-9999),
3 attrib='slope_degrees')Horn (1981) and Zevenbergen-Thorne (1987) are the two common algorithms; they use slightly different kernels but agree to within a few percent.
Aspect
Aspect is the direction of steepest descent — which way a surface faces, in degrees (0 = north, 90 = east, ..., 360 = north again).
$$\text{aspect} = \arctan2(dz/dy, -dz/dx)$$
Tools:
gdaldem aspect dem.tif aspect.tifAspect values are circular (359 ≈ 0); use circular statistics, not linear, for aggregations. For places with no slope (flat), aspect is undefined — usually reported as -1 or nodata.
Curvature
Curvature is the rate of change of slope — how concave or convex the terrain is at each cell.
- Profile curvature — along the downslope direction. Positive = concave (water collects); negative = convex (water spreads).
- Plan curvature — across the slope direction. Positive = diverging flow; negative = converging flow.
- Mean / total curvature — average of profile and plan.
Curvature is the second derivative of elevation, so noise in the DEM amplifies. Smooth before curvature calculation for noisy data.
Use cases
- Agriculture — aspect determines solar exposure; slope determines erosion risk.
- Avalanche / landslide — high-risk zones combine slope, aspect, and curvature.
- Civil engineering — road grading limits (typically <8% slope).
- Renewable energy — solar panel placement favours south-facing slopes (N hemisphere).
- Hydrology — profile curvature indicates water-collecting features (channels, depressions).
- Habitat modelling — many species show strong slope / aspect preferences.
Units
Slope can be expressed as:
- Degrees — 0–90.
- Percent — rise/run × 100 (45° = 100%).
- Gradient — decimal (0.5 = 50%).
Always know which; a "slope of 50" is ambiguous.
Resolution sensitivity
Slope values depend on DEM resolution. A 30 m DEM reports smaller slopes than a 1 m DEM because small-scale roughness is averaged out. Don't compare slopes across different-resolution DEMs without explicit conversion or documentation.
Worked example — farmland erosion risk
1import numpy as np
2from richdem import TerrainAttribute, rdarray
3[object Object]
4[object Object]
5Self-check exercises
1. What's the difference between slope expressed in degrees vs percent?
Degrees is the angle (0° = flat, 90° = vertical); percent is rise/run × 100. 45° = 100% (1:1 slope); 100° (in degrees) doesn't exist, but in percent it's a 2:1 slope (~63°). Road-grade regulations use percent; scientific literature often uses degrees. Always label.
2. Your aspect raster has small patches of "undefined" cells in flat areas. Why?
Aspect is the direction of steepest descent — on perfectly flat ground there's no such direction. Tools report it as -1 or nodata. In practice, add a small threshold: treat slopes below (say) 1° as "flat" and mask aspect. Some analyses use random azimuth as a proxy; others drop flat areas from aspect-sensitive calculations.
3. You're comparing slope values from 10 m and 30 m DEMs and they disagree dramatically. Which is "right"?
Neither — they represent different spatial scales of slope. 10 m captures small terraces and gullies; 30 m averages them. Pick the scale appropriate to your question: small-scale erosion needs fine resolution; watershed-scale analysis can use coarser. Never mix resolutions in the same analysis without explicit resampling.
Summary
- Slope = first derivative of elevation; aspect = direction of steepest descent.
- Curvature = second derivative; profile and plan curvature have distinct meanings.
- Tools:
gdaldem,richdem, GRASS r.slope.aspect, QGIS processing. - Derived rasters feed agriculture, hazard, hydrology, and habitat analyses.
Further reading
- Horn, B. K. P. (1981) — Hill Shading and the Reflectance Map.
- Zevenbergen & Thorne (1987) — Quantitative analysis of land surface topography.
- Florinsky, I. V. — Digital Terrain Analysis in Soil Science and Geology.
- Wilson & Gallant — Terrain Analysis: Principles and Applications.