GOLD STANDARD · REMOTE SENSING · HOW X WORKS
Find the decision hidden inside the model
A shadow mask can look exact while its boundary is controlled by uncertain terrain. Elevation error, grid spacing and co-registration move the computed horizon, and a small angular error can flip illumination across several image pixels when the Sun is low.
This guide connects the Gold Standard of Remote Sensing, Gold Standard of Education, and How X Works hub.
Chapter contents and reading routes
Choose the route closest to your present task. Every chapter remains expanded, so the article also reads naturally from start to finish.
Orient the geometry error
Calculate horizon sensitivity
Propagate into shadow boundaries
Transfer and validate
Use evidence and next routes
CHAPTER 1 OF 12 · ORIENT THE ERROR
1. A binary shadow begins with uncertain continuous geometry
A terrain-shadow algorithm often compares solar elevation with a computed horizon angle. The final output is lit or shadowed, but the inputs—elevation, position, slope, aspect and solar geometry—carry error. Near equality, tiny changes can flip the class.
The useful product is therefore not only a crisp mask. It is a mask plus an uncertainty band or probability describing where DEM and alignment errors could move the boundary. This article studies that propagation rather than repeating the basic horizon-shadow construction.
CHAPTER 2 OF 12 · ORIENT THE ERROR
2. Separate elevation accuracy from spatial resolution
Vertical accuracy describes error in elevation values. Grid spacing describes sampling density. Effective resolution also reflects smoothing, source sensor, interpolation and whether the model represents bare earth or a digital surface containing trees and buildings.
A 30 m grid with small pointwise vertical error can still omit a narrow ridge that controls the horizon. A fine grid can preserve detail but carry bias or vegetation height. Quote the product, version, datum, resolution and intended surface.
CHAPTER 3 OF 12 · CALCULATE THE HORIZON
3. Calculate one horizon angle
For a target and one ridge cell, approximate the vertical difference as Δz and horizontal distance as d. The horizon angle is α=arctan(Δz/d), after accounting consistently for curvature or projection when distances demand it.
Let Δz=100 m and d=500 m. Then α≈arctan(0.2)=11.31°. If the Sun elevation is 11.5°, the target is only 0.19° from the computed shadow decision. The confident-looking class is fragile.
CHAPTER 4 OF 12 · CALCULATE THE HORIZON
4. Propagate a vertical-error range
If the ridge height has ±10 m plausible error, α ranges from arctan(90/500)=10.20° to arctan(110/500)=12.41°. The same target can be lit at the low estimate and shadowed at the high estimate.
This ±about 1.1° effect is nonlinear and depends on distance and relief. A closer ridge or lower Sun can make the class even more sensitive. Evaluate the actual terrain rays rather than applying one global angular tolerance.
| Ridge difference | Horizon angle | Class at Sun elevation 11.5° |
|---|---|---|
| 90 m | 10.20° | Lit under this ray |
| 100 m | 11.31° | Lit, but marginal |
| 110 m | 12.41° | Shadowed under this ray |
CHAPTER 5 OF 12 · CALCULATE THE HORIZON
5. Translate height error into boundary displacement
For a simple 100 m obstacle and Sun elevation 11.5°, a planar shadow length is L=h/tan(11.5°)≈492 m. A ±10 m height difference changes that length by about ±49 m under the same simplified geometry.
With a 30 m image grid, 49 m is roughly 1.6 pixels. The estimate is not a universal terrain formula; it shows why a small vertical error can create a visible multi-pixel disagreement along low-Sun shadow edges.
CHAPTER 6 OF 12 · PROPAGATE THE SHADOW
6. Resolution changes the horizon itself
Coarsening a DEM can lower sharp peaks, fill narrow saddles and shift the cell chosen as the maximum horizon. Resampling a fine DEM to the image grid before ray tracing is not always equivalent to computing horizons at fine scale and then aggregating.
Test several plausible resolutions and aggregation rules. Preserve whether the image value represents a point, area average or mixed footprint. Shadow edges are high-frequency features, so scale mismatch deserves its own sensitivity result.
| Error source | How the boundary moves | Diagnostic |
|---|---|---|
| Vertical bias | Horizon systematically high or low | Compare surveyed elevations |
| Grid smoothing | Narrow ridges disappear | Repeat at finer resolution |
| Horizontal misregistration | Terrain and pixel rays mismatch | Shift-and-recompute test |
| Surface-model choice | Trees/buildings added or omitted | Compare DTM and DSM |
CHAPTER 7 OF 12 · PROPAGATE THE SHADOW
7. Co-registration can dominate a steep boundary
Even a correct elevation surface produces a wrong mask if the DEM and image are horizontally misaligned. On a steep slope, one-pixel displacement pairs radiance with the wrong illumination geometry and can resemble a reflectance anomaly.
Run controlled image-to-DEM shifts in x and y and compare boundary agreement. Do not tune the shift only until the image looks smooth; use independent control points or orthorectification evidence. Preserve the chosen datum and coordinate transform.
CHAPTER 8 OF 12 · TRANSFER AND VALIDATE
8. Transfer the uncertainty to snow mapping
A snow classifier may fail in mountain shadow because illumination changes spectral magnitude. The stable mechanism is a terrain-derived shadow boundary with uncertain position. The decision consequence changes: pixels can switch snow class or snow-covered area.
The changed-context check includes spectral ratio behavior, diffuse light, forest cover and the cost of false snow versus missed snow. Buffering every shadow by the same distance ignores Sun angle and local horizon sensitivity.
CHAPTER 9 OF 12 · TRANSFER AND VALIDATE
9. Use probabilistic or ensemble shadow products
Perturb elevations according to a defensible error model, vary co-registration and recompute the mask. The fraction of ensemble runs that classify a pixel as shadow gives a practical uncertainty surface. Spatial correlation in DEM error matters; independent pixel noise creates unrealistic rough terrain.
Where only bounds are available, map definitely lit, definitely shadowed and indeterminate zones. This is often more honest than a single probability whose error distribution was guessed. Keep the nominal mask for compatibility, but do not hide the boundary band.
CHAPTER 10 OF 12 · TRANSFER AND VALIDATE
10. Validate boundaries, not only overall accuracy
Most pixels may be far from a shadow edge, so overall agreement can be high while the boundary is misplaced. Evaluate distance-to-boundary error, false-lit and false-shadow rates in a buffer, and performance by solar elevation and terrain class.
Use field observations, high-resolution imagery, lidar-derived terrain or independent three-dimensional simulation where available. A visually plausible correction is not enough if retrieved reflectance jumps at uncertain edges.
CHAPTER 11 OF 12 · CHECK AND CONTINUE
11. Questions readers often ask
Does a finer DEM always give a better shadow mask?
No. Finer sampling can preserve important ridges, but bias, noise, vegetation, void filling and misregistration can still make it worse for the intended surface and image scale.
Can I use DEM RMSE as the shadow-boundary error?
Not directly. RMSE summarises vertical differences. Boundary error depends on the spatial structure of those errors, terrain geometry, distance, Sun angle, resolution and alignment.
CHAPTER 12 OF 12 · CHECK AND CONTINUE
12. Evidence, connected routes and the next check
Dozier’s analysis of topographic-correction error and uncertainty quantifies why small elevation errors can produce larger illumination and shadow errors. Jupp and colleagues’ DSM application study for Landsat terrain correction examines scale, resolution, co-registration and local terrain artefacts.
Continue through terrain shadows and horizon angles, terrain-reflected irradiance, and topographic normalisation limits. The next check is to perturb the DEM and alignment, then map the pixels whose illumination class changes.
Contents · Previous chapter · Return to the Remote Sensing root