Skip to content
GeoAI
QGIS
Guide

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

Coloured LiDAR hillshade of drumlins near Hood Canal, Washington, the bare ground with the forest removed.
Photo: Washington DNR, CC BY-SA 2.0, Wikimedia Commons.

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.

DSMDTM
Over a houseThe roofThe ground under it
Over a woodThe treetopsThe forest floor
Over a roadThe roadThe road, the same
Use it forViews, solar on roofs, 3DFlood, slope, drainage, contours
A schematic profile across a street: the DSM line in black stepping over two houses, three tree crowns and a garage, the DTM line in green following the sloping ground under them.
The DSM follows the tops, the DTM follows the ground, and the gap between them is the nDSM. Schematic.

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.