Skip to content
LidarKit

DEM vs DSM vs DTM

Two of these have settled meanings. The third does not, and that is the whole problem.

The short version:

  • DSM — Digital Surface Model. The elevation of the top of whatever is there: roofs, treetops, bridges, vehicles.
  • DTM — Digital Terrain Model. The bare ground, with everything above it removed.
  • DEM — Digital Elevation Model.Ambiguous. For some organisations it means bare earth and is a synonym for DTM; for others it is the umbrella term covering both of the above.

DSM and DTM are reliable. DEM is not, and treating it as though it were is the source of most of the confusion in this area — including expensive confusion, because a flood model built on a surface that still contains buildings is wrong in a way that is not obvious from looking at it.

DSM and DTM, precisely

Picture a laser measuring the height of a city block at one spot. Over open pavement, the first thing it hits is the ground, and DSM and DTM agree. Over a building, the first thing it hits is the roof — that is the DSM value — while the DTM value is the pavement the building stands on, which was never measured at that spot at all and has to be inferred from the pavement around it.

That distinction carries a consequence people often miss:

A DSM is measured. A DTM is partly invented. Under every building, and under dense vegetation where no pulse reached the ground, the terrain model contains interpolated values rather than observations. Good software interpolates sensibly and the result is usually excellent. But a DTM is a reconstruction, and its quality depends on how much real ground was visible nearby.

FeatureIn the DSMIn the DTM
BuildingsRoof heightRemoved — ground beneath, interpolated
Trees and vegetationCanopy heightRemoved — ground beneath
BridgesDeck heightConvention varies; often removed
VehiclesPresent, as bumpsRemoved
Embankments, cuttings, kerbsPresentPresent — they are terrain
Open groundIdentical in bothIdentical in both

The row to look at twice is bridges. A bridge is neither obviously terrain nor obviously an object, and different producers make different choices — some remove the deck, leaving the valley continuous underneath; others keep it, which makes a hydraulic model believe the river is dammed. If you are doing anything with water, find out which convention your data follows before trusting it.

Why DEM is ambiguous

There is no single authority for this term, and at least three conventions are in active use:

ConventionDEM meansWhere you meet it
Bare earthTerrain with objects removed — effectively a DTMUS federal mapping, including USGS elevation products; much American literature
Umbrella termAny raster of elevation values, of which DSM and DTM are the two kindsGIS software documentation, and most careful technical writing
Grid, as opposed to a structured modelA plain elevation grid, where a DTM additionally carries breaklines and mass pointsCivil engineering and surveying software

All three are defensible and all three are in print. The practical response is not to pick a favourite but to stop relying on the acronym: when someone hands you a file called dem.tif, the useful question is "does this have buildings in it?" — and that question has an answer you can check in about ten seconds.

How to tell which one you have

Open the raster and look at a built-up area or a patch of woodland.

  • Buildings appear as flat-topped blocks with sharp edges, and trees as rough irregular texture → DSM.
  • The same area is smooth, following the lie of the land, with roads and embankments visible but no structures → DTM.
  • Buildings are gone but the ground is oddly lumpy where vegetation was → a DTM whose ground classification struggled.

A hillshade makes this obvious at a glance, because it renders exactly the sharp edges that distinguish the two.Open a GeoTIFF elevation raster here— it hillshades on load and can drape an orthophoto over the terrain, which is the fastest way to see whether the surface follows the roofs or passes underneath them.

How each comes from a point cloud

All three products are usually derived from the samepoint cloud. What differs is which points are kept before the surface is built.

ProductPoints usedRasterised as
DSMAll points, or first returnsThe highest point in each cell
DTMGround-classified points only (class 2)Interpolated across cells with no ground point
nDSM / CHMNeither directlyDSM minus DTM, cell by cell

The pipeline, in the order it actually runs:

  1. Start with LAS or LAZ. One cloud, containing every return.
  2. Classify ground. Decide, for each point, whether it is bare earth. This is the step that determines whether the DTM is any good — seehow classification works.
  3. Filter. For a DSM, keep everything. For a DTM, keep only class 2.
  4. Rasterise. Impose a grid and reduce the points in each cell to one value — maximum for a DSM, mean or a fitted surface for a DTM.
  5. Fill the gaps. Cells with no surviving point get an interpolated value. For a DTM, every building footprint is such a gap.

Steps 4 and 5 are where the word "DEM" usually enters: the output is an elevation raster, and whether it is a DSM or a DTM was decided back at step 3.

Creating a DTM andcreating a DSM each cover their own route in detail, including what goes wrong.

Subtracting one from the other

Because a DSM and a DTM share a grid, subtracting them cell by cell gives a raster of height above ground:

nDSM = DSM − DTM

This is called a normalised DSM, or a canopy height model when the subject is trees. It is more useful than either input for a whole class of questions, because it removes the terrain from the answer. A 12-metre building reads 12 whether it sits in a valley or on a ridge, so you can threshold it directly — above 2 m and compact is probably a structure, above 2 m and rough is probably a tree — without first accounting for the slope it stands on.

Which one you actually want

TaskUseWhy
Flood and drainage modellingDTMWater flows over ground. A roof in the surface diverts a flood that would not be diverted.
Contours and slope mapsDTMContours over treetops are meaningless.
Earthworks and cut/fill volumesDTMYou are moving ground, not vegetation.
Line of sight, viewshedsDSMBuildings and trees are exactly what blocks the view.
Solar potential on roofsDSMThe roof is the subject.
Telecoms and signal propagationDSMObstructions are the point.
Forest canopy heightBoth → CHMThe answer is the difference between them.
Building heightsBoth → nDSMAs above.
Orthophoto rectificationDependsA DTM leaves buildings leaning; a DSM gives a true orthophoto.

Working with these here

The classification that decides whether a terrain model is any good, and the checking of whatever surface you end up with, both run in your browser:

  • Automatic classification (experimental) labels ground, vegetation and buildings in a LAS or LAZ file — the input a DTM is built from. It was written for photogrammetric clouds with no return information, and like every automatic classifier its output needs checking.
  • LAS to DEM grids a LAS or LAZ file into a DSM or DTM GeoTIFF at the cell size you choose, dropping noise and withheld points first, and shows the result hillshaded before you download it.
  • The point cloud viewer colours by classification, so you can see which points a terrain model would keep before committing to one.
  • The GeoTIFF viewer opens elevation rasters, hillshades them, applies an elevation ramp and renders them in 3D — the fastest way to check whether a surface follows the roofs or passes underneath them.

The gridding step, which turns the classified points into the raster, is mechanical compared to the classification that feeds it — which is why the surest way to improve a terrain model is to go back to the points, not to change the interpolator.

Common mistakes

  • Assuming a file called "DEM" is bare earth. Look at a built-up area before trusting it.
  • Using last returns as a DTM. A last return on a roof is still on the roof.
  • Not checking the bridge convention before hydraulic modelling.
  • Comparing a DSM from one date with a DTM from anotherand reporting the difference as change. The difference is mostly trees.
  • Ignoring the vertical datum. Two elevation rasters can be internally perfect and disagree by metres because one is on an ellipsoid and the other on a geoid. Seewhat a CRS is.

Frequently asked questions

What is the difference between a DSM and a DTM?
A DSM records the elevation of the top of whatever is there — roofs, tree canopy, bridges — while a DTM records the bare ground with those objects removed. Over open terrain the two are identical; over a city or a forest they can differ by tens of metres. Subtracting one from the other gives the height of everything above the ground.
What does DEM mean?
It depends who is speaking, which is why the term causes so much confusion. Some organisations use DEM to mean bare-earth terrain, making it a synonym for DTM — this is the convention of the US Geological Survey. Others use it as an umbrella term for any raster of elevation values, with DSM and DTM as the two specific kinds. Always check which is meant rather than assuming.
Is a DEM the same as a DTM?
In American usage, usually yes. In the broader and more careful usage, no: a DEM is any elevation raster and a DTM is specifically the bare-earth one. A third convention, common in engineering software, treats a DTM as a terrain model that additionally carries breaklines and other structural features rather than being purely a grid.
How do I get a DTM from a LiDAR point cloud?
Classify the ground points, keep only those, and interpolate a continuous surface across the gaps left where buildings and vegetation were removed. The classification step is the one that determines quality; the interpolation is comparatively mechanical. See the dedicated article on creating a DTM for the details and the failure cases.
Can I just use last returns for a DTM?
No, and this is a common and costly shortcut. A last return is simply the final echo of its pulse; over a building roof the first and last return are both on the roof, and under dense vegetation a pulse may never reach the ground at all. Last returns are a useful input to ground classification, not a substitute for it.
What is an nDSM or a canopy height model?
A normalised DSM is the DSM minus the DTM, so its values are heights above the local ground rather than above a datum. A building 12 m tall reads 12 whether it stands in a valley or on a hill. When the objects of interest are trees, the same subtraction is called a canopy height model.
How do I tell whether a raster I was given is a DSM or a DTM?
Open it and look at a built-up area or a patch of woodland. Buildings as flat-topped blocks with sharp edges and trees as rough texture means a DSM; a smooth surface following the lie of the land with roads and embankments but no structures means a DTM. A hillshade makes the difference obvious at a glance, because it renders exactly those sharp edges.