Skip to content
GeoAI
QGIS
Guide

DSM vs DTM vs DEM: The Difference, Measured, and Free Downloads

Published Updated

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.

Picture a sheet thrown over the landscape. Where it rests on roofs, treetops and power lines, it is a DSM. Take everything away so it lies on the bare ground, and it is a DTM.

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. DEM, digital elevation model, is the generic word for either. All three are rasters carrying one height per cell.

DSMDTM
Bare groundOnly where nothing stands on itYes, everywhere
Buildings and treesYesNo
Main usesLine of sight for telecoms, solar on roofs, 3D city modelsEarthworks, cut and fill, flood and drainage studies
The formulaDSM minus DTM = the height of buildings and trees

DSM vs DTM vs DEM at a glance

A DSM follows the tops, a DTM follows the ground, and DEM is the family name for both. DSM minus DTM equals the height of everything that stands on the ground. That third raster is called the nDSM, or the canopy height model when what stands on the ground is a forest. DEM is the loose word: most catalogues use it for bare ground, but some ship a DSM under it.

DSMDTMnDSM or CHM (DSM minus DTM)
Over a houseThe roofThe ground under itThe height of the house
Over a woodThe treetopsThe forest floorThe height of the trees
Over a roadThe roadThe road, the sameAbout zero
Values areAltitudeAltitudeHeight above ground
Use it forViews, solar on roofs, 3DFlood, slope, drainage, contoursBuilding and tree heights
Free exampleCopernicus DEM GLO-30USGS 3DEP 1 mIGN LiDAR HD MNH
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.

DEM vs DTM vs DSM: what DEM means depends on who wrote it

DEM is the umbrella term, and whether it means bare ground or surface depends on the agency that published the file. The same three letters sit on datasets of both kinds, so the name alone never tells you which one you downloaded.

  • In the United States, DEM usually means bare earth. The USGS defines a DEM as "the bare ground (bare earth) topographic surface of the Earth excluding trees, buildings, and any other surface objects". The standard 3DEP DEMs follow that rule.
  • In European standards, DEM covers both. The EU's INSPIRE elevation specification calls the bare-ground model a DTM and the model with vegetation and buildings a DSM, and its data model permits both under the DEM heading. The UN-GGIM Europe recommendation asks each country to supply a DTM and a DSM at every level of detail.
  • Global DEMs are mostly surfaces. The Copernicus DEM carries DEM in its name and states on the same page that it is a DSM "including buildings, infrastructure and vegetation". SRTM is also a radar surface: in a Bavarian forest test, Jacobsen at Leibniz University Hannover found SRTM heights on average 13.8 m above a LiDAR ground model.

A USGS paper on DEM terminology puts it plainly: DEM is a general term, and DSM or DTM are the specific ones. When a colleague says DEM, ask which one. When a file says DEM, read its documentation.

How far apart are a DSM and a DTM? One French town, measured

On a 1 km² LiDAR tile over Sommières, a town on the Vidourle river in southern France, the DSM stands more than 2 m above the DTM on 52% of the ground, and water raised 5 m above the river covers less than a fifth as much ground on the DSM as on the DTM. We measured this on 23 September 2026 with IGN's LiDAR HD surface and terrain models (MNS and MNT, 0.5 m cells, 4 million cells each), then repeated it on a forest tile in the Vosges.

On one 1 km² tileSommières (town and river)Gérardmer, Vosges (conifer forest)
DSM more than 0.5 m above the DTM58% of the tile67% of the tile
DSM more than 2 m above the DTM52%65%
Median height of what stands outside buildings6.7 m17.5 m
Mean slope, DTM / DSM, 0.5 m cells8° / 29°21° / 51°
Mean slope, DTM / DSM, resampled to 5 m7° / 23°20° / 40°
Share of the tile steeper than 30°, DTM / DSM7% / 41%17% / 69%

Buildings cover 13% of the Sommières tile, so trees and hedges make most of that 52%. The same subtraction gives you building heights: across the 1,029 footprints of 20 m² or more in IGN's BD TOPO, the median of DSM minus DTM inside each footprint is 9.5 m, against 10.2 m in BD TOPO's own height field. In France you don't even have to compute it, because IGN publishes the difference ready-made as the LiDAR HD MNH.

Four panels of one 1 km square over Sommières: DSM hillshade, DTM hillshade, DSM minus DTM in colour, and a 5 m flood that fills the channel on the DTM but stops at the Roman bridge on the DSM.
Sommières, Gard, IGN LiDAR HD 0.5 m, 1 km by 1 km, measured 23 September 2026.

Slope is where a DSM does the most damage. Every roof edge and every tree crown reads as a small cliff, so the mean slope in Sommières goes from 8° on the DTM to 29° on the DSM, and resampling to 5 m before computing slope only brings it down to 23°. A slope class map built on the DSM would put 41% of the tile in a class steeper than 30°, against 7% on the DTM.

A DSM turns a bridge into a dam

Raise the water 5 m above the lowest ground point on the river and the DTM floods 8.1 ha of the tile and reaches 34 buildings. The DSM floods 1.5 ha and reaches one. The DSM keeps the Roman bridge over the Vidourle, and in a raster that stores one height per cell a bridge deck is a solid wall down to the riverbed, so the water stops at it. Along the banks, tree crowns hanging over the water take another strip off the flooded area. The flood simulation guide runs the same test on the DTM, the right model for it.

Left, the orthophoto of the Roman bridge over the Vidourle. Right, the DSM of the same window: water below the bridge on both models, above it on the DTM only.
The Roman bridge in Sommières with the same 5 m flood on the DSM. Blue is wet on both models, orange only on the DTM. IGN LiDAR HD and orthophoto, 23 September 2026.

How we measured this

We downloaded the MNS and MNT for each 1 km box from IGN's Géoplateforme (Licence Ouverte 2.0), subtracted them cell by cell and computed slope the same way on both. The flood is a bathtub fill: every cell below the water level and connected to the river's lowest point, with no flow and no timing, so it shows what each model lets water through, not a flood forecast. "Stands outside buildings" means taller than 2 m outside a BD TOPO footprint, which is mostly trees but also counts pylons and bridges. Two tiles are two places, not a national average, and we did not test a 30 m global DSM, which averages the canopy over far larger cells.

nDSM and canopy height model: DSM minus DTM

An nDSM, normalised DSM, is the DSM minus the DTM, so each cell holds the height of whatever stands there instead of its altitude. Over a forest the same raster is called a canopy height model, or CHM. NEON, the US ecological observatory, defines it the same way: DSM minus DTM equals CHM, the height of the objects on the surface.

How to compute it in the QGIS Raster Calculator

  1. Load the DSM and the DTM of the same area. Take both from the same survey, so they share the date, the grid and the vertical datum.
  2. Open Raster > Raster Calculator. The QGIS manual names each band layer_name@band_number, so a layer called dsm is "dsm@1".
  3. Type the subtraction, DSM first: "dsm@1" - "dtm@1".
  4. Small negative values can appear where the two models disagree, over water or at tile edges. To set them to zero in the same step, add a comparison, which QGIS evaluates to 1 or 0: ("dsm@1" - "dtm@1" > 0) * ("dsm@1" - "dtm@1").
  5. Take the extent and resolution from the DSM. If the two grids differ, the calculator resamples with nearest neighbour, so align them first when you can.

Subtract in the other order and you get negative heights. NEON's own CHM tutorial warns that the wrong order gives "trees with negative heights".

What an nDSM is used for

  • Building heights. Run Zonal statistics with building footprints over the nDSM and keep the median, which a chimney or an overhanging branch barely moves. That is how we got the 9.5 m median in Sommières. To turn those heights into storeys, see floor heights measured on real buildings. AI Segmentation, the plugin we make at TerraLab for QGIS, draws the footprints on the orthophoto, and the building footprint guide shows the join. If you only need the height of a few buildings, the free building height map (French interface) reads it for you: IGN's measured height in France, Overture elsewhere.
  • Tree heights and canopy cover. Threshold the CHM at 2 m or 5 m and you get a canopy mask, with the height of each crown kept. The tree canopy guide compares this with five other methods.
  • Change over time. Two nDSMs from different years show new buildings, felled trees and storm damage.

In France, IGN publishes this raster ready-made as the LiDAR HD MNH, at 0.5 m, so you can skip the subtraction.

Which one you have

Read the product documentation, not the file name. 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. Only LiDAR gets underneath, because some of its pulses find a gap in the leaves and come back off the ground. The photogrammetry vs LiDAR guide goes further.

Why a DTM is harder to get than a DSM

A DSM comes straight out of any survey: every photogrammetry run and every LiDAR flight produces one. A DTM needs points on the ground, and under trees only LiDAR records them. So a drone flown with a camera alone gives you a DSM, and a DTM of a wooded site means a LiDAR flight or a ground survey.

Even with LiDAR, the DTM costs an extra step: each point has to be classified as ground or not, and the gaps under buildings are filled by interpolation. Over open fields the two models nearly match, so the extra cost buys little there. Under forest, or in a town, it is the only way to see the ground.

Which one to use in QGIS

Use the DTM for anything water or slope, the DSM for anything that looks across the tops, and their difference for heights.

  • 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, computed in the Raster Calculator as shown in the nDSM section above.

AI Agent does this from a sentence inside QGIS. Ask it to load the elevation for the area on screen, and it pulls an open DEM such as the Copernicus DEM or national LiDAR, then runs the hillshade or the raster calculator for you.

Try it free in QGIS, no card needed

Where to download each one for free

Almost every country publishes its own elevation data for free, and a national LiDAR dataset beats anything global at the scale you work at. The last two columns are what matter: whether you get a surface or bare ground, and at which cell size. I checked each source on its own page on 27 September 2026. We timed the download routes and measured eight free DEMs against LiDAR on one valley in free DEM download in QGIS.

SourceCoversSurface or terrainResolution
Copernicus DEM GLO-30WorldwideDSM, from TanDEM-X radar, 2011 to 201530 m, and 90 m (GLO-90)
SRTM 1 Arc-Second Global60° N to 56° SSurface over forest, radar flown in February 2000About 30 m
USGS 3DEPUnited StatesDTM (bare earth), public domain1 m from LiDAR, about 10 m seamless
IGN LiDAR HDFrance, block by blockMNT (DTM), MNS (DSM) and MNH (nDSM)0.5 m
IGN RGE ALTIFranceDTM1 m
AHNNetherlandsBoth, as separate terrain and surface models0.5 m and 5 m
DEFRA Data ServicesEnglandBoth, as separate composites1 m
OpenTopographyWorldwideRaw LiDAR point clouds, plus the global rasters above1 m where LiDAR was flown

A few details the table hides. The Copernicus DEM also has a 10 m version, EEA-10, for Europe, and its release note notes that a DTM is what flood and drainage modelling usually needs. The SRTM heights use the EGM96 geoid, while 3DEP uses NAVD88, so check the datum before you mix them. AHN's surface model no longer includes power lines and pylons from AHN6 on. For a 30 m global surface over a forest, remember the canopy is averaged into the cell: a 30 m DSM minus a 1 m DTM is not a tree height.

Drop a downloaded tile straight onto the canvas. QGIS reads GeoTIFF, and the elevation is in the single band, so Raster > Analysis > Slope and Hillshade work on it with no preparation. For France, the LiDAR HD guide shows four ways to get the tiles into QGIS.

Questions people ask

What is the difference between a DEM and a DTM?

DEM is the general term for any elevation raster. A DTM is one kind of DEM, the bare ground only. In the US a DEM almost always means a DTM. In Europe and in global datasets, a DEM can just as well be a DSM.

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.

Is the Copernicus DEM a DSM or a DTM?

A DSM. Copernicus states that it represents the surface "including buildings, infrastructure and vegetation", even though its name says DEM.

What is an nDSM?

The DSM minus the DTM, cell by cell. It holds the height of buildings and trees above the ground instead of their altitude. Over a forest it is called a canopy height model.

Does LiDAR give a DSM or a DTM?

Both, from the same flight. The first return off each pulse builds the DSM. The pulses that find a gap in the leaves and reach the ground are classified as ground returns and interpolated into the DTM, which is why LiDAR can see under a canopy and a camera cannot.

Can I get a DTM from a satellite image?

Not from a single image, which carries no height. A stereo pair, two images of the same place from different angles, gives a DSM. Turning that into a DTM means filtering out everything that is not ground, which works in open country and fails under dense canopy, where no ground was ever seen. For most countries the national elevation dataset is free and better than anything you could derive yourself.

Can free software turn a DSM into a DTM?

Partly, and it works on the point cloud rather than on the raster. Ground filters such as the Cloth Simulation Filter, a plugin in the free CloudCompare and a filter in PDAL, flip the cloud upside down and drop a virtual cloth on it: the points the cloth touches are kept as ground. It does well on open and gently rolling ground. It struggles on steep banks and cliffs, where real ground can be cut off as if it were an object, and it cannot recover ground that no point ever reached, such as under dense canopy in a photogrammetry cloud.

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. With a DTM the correction only puts the ground in the right place, and everything standing on it still leans away from the centre of the photo.

The QGIS AI hub collects what AI can and cannot do inside QGIS.