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.
| Feature | In the DSM | In the DTM |
|---|---|---|
| Buildings | Roof height | Removed — ground beneath, interpolated |
| Trees and vegetation | Canopy height | Removed — ground beneath |
| Bridges | Deck height | Convention varies; often removed |
| Vehicles | Present, as bumps | Removed |
| Embankments, cuttings, kerbs | Present | Present — they are terrain |
| Open ground | Identical in both | Identical 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:
| Convention | DEM means | Where you meet it |
|---|---|---|
| Bare earth | Terrain with objects removed — effectively a DTM | US federal mapping, including USGS elevation products; much American literature |
| Umbrella term | Any raster of elevation values, of which DSM and DTM are the two kinds | GIS software documentation, and most careful technical writing |
| Grid, as opposed to a structured model | A plain elevation grid, where a DTM additionally carries breaklines and mass points | Civil 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.
| Product | Points used | Rasterised as |
|---|---|---|
| DSM | All points, or first returns | The highest point in each cell |
| DTM | Ground-classified points only (class 2) | Interpolated across cells with no ground point |
| nDSM / CHM | Neither directly | DSM minus DTM, cell by cell |
The pipeline, in the order it actually runs:
- Start with LAS or LAZ. One cloud, containing every return.
- 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.
- Filter. For a DSM, keep everything. For a DTM, keep only class 2.
- 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.
- 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
| Task | Use | Why |
|---|---|---|
| Flood and drainage modelling | DTM | Water flows over ground. A roof in the surface diverts a flood that would not be diverted. |
| Contours and slope maps | DTM | Contours over treetops are meaningless. |
| Earthworks and cut/fill volumes | DTM | You are moving ground, not vegetation. |
| Line of sight, viewsheds | DSM | Buildings and trees are exactly what blocks the view. |
| Solar potential on roofs | DSM | The roof is the subject. |
| Telecoms and signal propagation | DSM | Obstructions are the point. |
| Forest canopy height | Both → CHM | The answer is the difference between them. |
| Building heights | Both → nDSM | As above. |
| Orthophoto rectification | Depends | A 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.