Skip to content
LidarKit

Compare two elevation models

Drop two DEMs and get the difference between them: where they disagree, by how much, and whether that is a shift or a spread. Runs on your machine — no upload.

Reference DEM

Drop the reference GeoTIFF

or choose a file

single-band DEM, DSM or DTM

The one you trust. Differences are measured against this surface, so it should be the survey-grade product.

Compared DEM

Drop the compared GeoTIFF

or choose a file

single-band DEM, DSM or DTM

The one being checked — the photogrammetric or newly processed model.

No upload. Processing runs in a Web Worker on your device — this app has no server component and no upload endpoint. How it works

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

  1. 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.
  2. 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.
  3. 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

FigureWhat it tells you
Mean differenceThe systematic offset. Bias, not error — usually a datum difference or a floating photogrammetric block.
RMSEBias and spread together, with the large errors weighted heavily. The figure accuracy reports conventionally quote.
Standard deviationThe spread once the offset is removed.
NMADThe spread a single wild cell cannot move. On real elevation data this is closer to what a typical cell disagrees by.
LE90 and LE95The 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.

Frequently asked questions

Which file should be the reference?
The one you trust. Differences are computed as compared minus reference, so a positive number means the model being checked sits above the one taken as truth. If you are checking a photogrammetric surface against a lidar survey, the lidar is the reference. If you are measuring change over time, the earlier survey is the reference and the difference becomes growth where it is positive and loss where it is negative.
What cell size should the comparison use?
The coarser of the two inputs, which is what the field is filled in with. Comparing at the finer model's resolution does not recover detail the other one never had — it interpolates the coarse surface up and then reports that interpolation as a difference between the products. You can set it coarser still, which averages more source cells into each comparison cell and is a reasonable thing to do when both models are noisy.
Why is the mean difference not zero even though the surfaces look aligned?
Usually a vertical datum. Two models of the same ground referenced to different geoid or ellipsoid heights differ by a near-constant amount across the whole site — often between a few centimetres and several tens of metres. A photogrammetric model built from GPS camera positions alone, with no ground control, will also float. Read the mean against the NMAD for exactly this reason: a mean much larger than the spread is a datum offset, not error — the offset is a georeferencing fact, and the spread around it is the accuracy figure you actually wanted.
What is NMAD, and why is it shown next to RMSE?
The normalised median absolute deviation: the median of how far each cell is from the median difference, scaled by 1.4826 so it is directly comparable to a standard deviation. It matters because DEM error is reliably not normally distributed. A photogrammetric surface over water, glass roofs or dense canopy carries a tail of enormous errors, and RMSE — which squares everything — is dominated by that tail. Quote RMSE and you overstate how far a typical cell is out; quote only NMAD and you hide that the tail exists. Both are shown so neither reading can be taken alone.
How are the coordinate systems handled?
They are checked, not converted. Nothing here reprojects, so if the two files declare different EPSG codes the comparison stops and says so rather than subtracting coordinates that do not describe the same ground. There is an override for the case where you know one of the labels is simply wrong and the coordinates really do match. When a file declares no CRS at all, the two are assumed to share one and that assumption is checked no further than their extents overlapping — which the page also tells you.
What happens where one model has a hole?
Those cells are reported, not filled. A cell needs a value in both models to be comparable, and the coverage breakdown counts the four cases separately: both, reference only, compared only, and neither. The distinction carries information. Cells the reference has and the compared model does not are holes in the new product — water, shadow, anything it could not reconstruct. Cells the other way round are surface where the reference saw nothing, which is usually interpolation reaching out past the measured data.
How large a pair of rasters can it handle?
Larger than you are likely to have. Both files are read from whichever pyramid level is closest to the comparison resolution rather than always at full size, and the comparison grid itself is capped, so memory follows the size of the shared extent and not the size of the files. A raster far finer than the comparison grid is read down to roughly twice that resolution and averaged, and the page says in the result when that happened.
What comes out as a file?
A single-band Float32 GeoTIFF of the difference, tiled and Deflate compressed, with nodata at −9999 where the two models could not be compared, and the reference file's coordinate system written onto it. Every cell is compared minus reference in the vertical units of the inputs, so it opens straight into any GIS as a signed change raster.