DSM vs DTM: The Difference, and Which One You Have

A DSM, digital surface model, is the height of the first thing a sensor sees from above: a roof, a treetop, a parked lorry, or the ground where nothing stands on it. A DTM, digital terrain model, is the height of the bare ground with all of that removed. Both are rasters with one height per cell.
The difference in one line
DSM minus DTM equals the height of everything that stands on the ground. That third raster is called the nDSM.
| DSM | DTM | |
|---|---|---|
| Over a house | The roof | The ground under it |
| Over a wood | The treetops | The forest floor |
| Over a road | The road | The road, the same |
| Use it for | Views, solar on roofs, 3D | Flood, slope, drainage, contours |

Which one you have
The label on the file is not always the answer. Three checks:
- The name says DTM or "bare earth". It is a DTM. France's RGE ALTI and the Environment Agency's DTM tiles are examples.
- The name says DEM. Read the documentation. DEM is the generic word, usually a DTM, but SRTM and the Copernicus DEM both behave like a DSM over forest.
- It came from a drone or from photographs. It is a DSM. A camera cannot see the ground under a tree, so photogrammetry gives you the surface. The photogrammetry vs LiDAR page explains why.
Which one to use in QGIS
- Slope, hillshade, contours, flood extent, drainage. DTM. A DSM gives you a hillshade of the rooftops and water that pools behind every hedge.
- Line of sight, solar on roofs, a 3D scene. DSM. You want the buildings and the trees in the way.
- Building heights, tree heights. The nDSM. Open the Raster Calculator and type
"dsm@1" - "dtm@1", with the two layers on the same grid. Join the result to a footprint layer and each building gets a height. AI Segmentation, the plugin we make at TerraLab for
, draws those footprints on the orthophoto, and the building footprint guide shows the join.
Questions people ask
Is a DEM a DSM or a DTM?
Usually a DTM, but check. The USGS uses DEM for bare earth. SRTM and the Copernicus DEM are labelled DEM and behave like a DSM over forest.
Can I get a DTM from a satellite image?
No. A photograph carries no height. For most countries the national elevation dataset is free, and it is better than anything you could derive from an image.
What is a true orthophoto, and why does it need a DSM?
An orthophoto corrected with a DSM instead of a DTM, so each roof lands on its footprint instead of leaning outward. The orthomosaic vs orthophoto page has the details.
The QGIS AI hub collects what AI can and cannot do inside QGIS.


