What a DEM of difference is
Two elevation models of the same ground are subtracted cell by cell. What comes out is a third raster whose value at each cell is how much higher or lower one surface sits than the other, and a handful of numbers summarising the whole field. It is the standard way to answer three quite different questions with the same arithmetic:
- Is this product accurate? Compare a new model against a survey-grade one and read the spread. This is the photogrammetry check — a WebODM or Pix4D surface against lidar.
- What changed? Compare two surveys of the same site at different dates and read the map. Erosion, deposition, subsidence, construction, stockpile growth.
- How much material moved? Multiply the difference by the cell area and sum it. Cut, fill and the net between them.
The arithmetic is trivial. Everything that makes the answer right or wrong happens before the subtraction.
The three decisions that move the answer
- Where the comparison happens. Only the rectangle both rasters cover. Outside it there is one surface, not two, and a difference is undefined rather than zero. The page reports how much of each input that shared strip represents, because a comparison over the corner where two tiles clip is not a comparison of the products.
- What grid they meet on. Two DEMs almost never share one. Different origins, different cell sizes, sometimes a rotation — and a half-cell offset on a 30° slope at 50 cm resolution is a 29 cm difference that is entirely an artefact of sampling. Both are resampled onto one common grid at the coarser input's resolution: a source finer than that grid is averaged down, and one at or above it is bilinearly interpolated.
- What counts as comparable. A cell needs a real value in both models. Interpolation is never used to reach across a hole into ground that was not measured, which costs a one-cell fringe around every void and buys a difference map on which every coloured cell is a difference between two measurements.
Reading the numbers
| Figure | What it tells you |
|---|---|
| Mean difference | The systematic offset. Bias, not error — usually a datum difference or a floating photogrammetric block. |
| RMSE | Bias and spread together, with the large errors weighted heavily. The figure accuracy reports conventionally quote. |
| Standard deviation | The spread once the offset is removed. |
| NMAD | The spread a single wild cell cannot move. On real elevation data this is closer to what a typical cell disagrees by. |
| LE90 and LE95 | The band 90% and 95% of cells fall inside, measured rather than assumed from a normal curve. |
The pattern worth watching for is a mean much larger than the NMAD. That is two surfaces of the same shape sitting at different heights, which is a georeferencing problem and not a quality one, and it is fixed by shifting one model rather than by reprocessing it.
Things worth anticipating
- Water reads as noise or as a hole. Photogrammetry cannot match texture on moving water and lidar gets little back from it. Expect either enormous differences or nodata over every pond and river, and read the rest of the site accordingly.
- Vegetation is the largest honest difference. A photogrammetric surface sits on top of the canopy; lidar's last return reaches into it. Metres of disagreement under trees is the two sensors measuring different things, not one of them being wrong.
- Building edges light up. Both surfaces jump several metres across a roof edge, so a horizontal misalignment of even one cell produces a bright outline around every structure. A difference map ringed with building outlines is telling you about horizontal registration, not vertical accuracy.
- A DSM and a DTM are not comparable. Subtracting one from the other gives the height of everything standing on the ground, which is a useful product but is not an accuracy assessment. Compare surface against surface and terrain against terrain.
Check the map, not only the table
The statistics describe the whole field at once, and a field can average beautifully while being wrong in a way that matters. Look at where the colour is. Difference that is evenly scattered is noise. Difference concentrated in one corner is a tilt. Difference tracing the flight lines is a calibration problem. Difference following the vegetation is the two sensors doing their jobs. None of those look different in the RMSE.