HERE Technologies and Wherobots announce partnership Learn More

What is a Digital Elevation Model? DEM vs DSM vs DTM

Authors

A digital elevation model (DEM) is a raster in which every cell holds a height, on a regular grid with a known cell size, horizontal coordinate system, and vertical datum. The term covers two kinds of model. A digital terrain model (DTM) records the bare ground. A digital surface model (DSM) records the first surface seen from above, including trees and roofs. Slope, aspect, hillshade, drainage, and visibility are all computed from a DEM. Flood maps, site screening, and line-of-sight planning start from one. The claim this article tests: a free 30 m surface model is enough for regional slope classes, and too coarse for slope at building scale.

The Havasu catalog holds two global elevation rasters. One is Copernicus DEM GLO-30, a 30 m surface model. The other is the Advanced Spaceborne Thermal Emission and Reflection Radiometer (ASTER) Global DEM v3, at the same grid spacing.

Key takeaways

  • A DEM stores one height per cell. Cell size, vertical accuracy, and vertical datum are separate properties.
  • DTM means bare earth; DSM includes canopy and buildings. Most free global 30 m products are surface models. The U.S. Geological Survey (USGS) 3D Elevation Program (3DEP) and FABDEM (Forest And Buildings removed Copernicus DEM) are terrain models.
  • Heights refer to a vertical datum, a reference surface for zero height. Examples are EGM96 (Earth Gravitational Model 1996), EGM2008 (Earth Gravitational Model 2008), and NAVD88 (North American Vertical Datum of 1988) in the United States. Mixing datums shifts every cell by the gap between them.
  • Slope, aspect, and hillshade read each cell and its 8 neighbors. Flow routing moves water from cell to cell.
  • On a 30 m surface model, slope at a building mixes the terrain with the roof edge, so building-level slope needs a terrain model or lidar.

What a digital elevation model is

Charles Miller and Robert Laflamme of the Massachusetts Institute of Technology Photogrammetry Laboratory introduced the digital terrain model in 1958. Their model was many points with known x, y, and z coordinates that represent the ground. The modern DEM is the gridded form of that idea, stored as a raster such as a GeoTIFF.

DEM vs DSM vs DTM

ModelWhat it recordsTypical sources
Digital elevation model (DEM)Umbrella term for any gridded height model; many agencies use it for bare earthAny
Digital terrain model (DTM)Bare ground, with vegetation and structures removedLidar ground returns, FABDEM, survey, contour maps
Digital surface model (DSM)The first surface from above: canopy, roofs, bridgesRadar interferometry, stereo imagery, lidar first returns

The USGS defines a DEM as the bare-earth surface excluding trees, buildings, and other surface objects. The Copernicus DEM product handbook states that the Copernicus DEM is a DSM that includes buildings, infrastructure, and vegetation. A DSM minus a DTM gives the height of trees and buildings, the basis of canopy and building height models in lidar data.

Diagram in two panels. Left: a cross-section of a hill with trees and two buildings. A white line traces the bare-earth terrain model. A dashed pink line traces the surface model over the canopy and roofs. A yellow stepped line shows the surface averaged into 30 m cells, with an arrow marking DSM minus DTM as object height. Right: a 3 by 3 grid of cells labeled a to i around a center cell e, with an arrow from e to the steepest neighbor i. The panel also shows the Horn slope formulas for dz/dx and dz/dy, plus one-line definitions of aspect, hillshade, and D8 flow
Left: a terrain model, a surface model, and the 30 m surface grid a product such as Copernicus GLO-30 stores. Right: slope, aspect, hillshade, and D8 flow all read a cell and its 8 neighbors.

How a digital elevation model works

A DEM is built by measuring heights, putting them on a grid, and tying them to a datum.

Measure. Radar interferometry compares the phase of two radar images taken from slightly different positions. Lidar times laser pulses. Stereo photogrammetry matches features in two optical images. Ground survey and digitized contours fill the rest. Radar and stereo imagery record the first surface they reach, so they produce surface models. Lidar records several returns per pulse, so one survey yields both a DSM and a DTM.

Grid. Interpolation turns points or image matches into a regular grid. Cell size, often called resolution, is the grid spacing: 1 arc-second, about 30 m, for the global products, and 1 m for lidar-derived national models. Michael Hutchinson's ANUDEM method made gridded surfaces drain the way real valleys do. He described it in A new procedure for gridding elevation and stream line data with automatic removal of spurious pits (Journal of Hydrology, 1989).

Reference. Every height is relative to a vertical datum, covered below.

A 30 m cell averages everything inside it, so a levee or a narrow ridge crest can disappear while the cell stays within its accuracy specification.

Digital elevation model data sources

DatasetSensor and epochGrid spacingCoverageModel typeVertical datum
SRTMC-band radar interferometry, February 20001 arc-second (about 30 m)60°N to 56°SSurfaceEGM96
ASTER GDEM v3Optical stereo (ASTER), version 3 released 20191 arc-second83°N to 83°SSurfaceEGM96
ALOS AW3D30Optical stereo (PRISM), 2006 to 20111 arc-secondGlobal landSurfaceEGM96
Copernicus GLO-30X-band radar (TanDEM-X), 2011 to 20151 arc-secondGlobalSurfaceEGM2008
FABDEMCopernicus GLO-30 with trees and buildings removed by machine learning1 arc-secondGlobalTerrainEGM2008
USGS 3DEP 1 mAirborne lidar1 mUnited States, growingTerrainNAVD88
Timeline chart of six free elevation models from 2000 to 2025. SRTM is a short bar in February 2000. ASTER GDEM version 3 is a diamond at its August 2019 release. ALOS AW3D30 spans 2006 to 2011, Copernicus GLO-30 2011 to 2015, and FABDEM 2011 to 2015 with a 2022 release diamond. USGS 3DEP is collected survey by survey. Columns label SRTM, ASTER, AW3D30, and GLO-30 as surface models, FABDEM and 3DEP as terrain models, with vertical datums EGM96, EGM2008, and NAVD88
Free DEMs by acquisition period, model type, and vertical datum. Four of the six global and national products are surface models; FABDEM and USGS 3DEP are terrain models.

SRTM. The Shuttle Radar Topography Mission flew on Space Shuttle Endeavour in February 2000 with one radar antenna in the payload bay and a second on a 60 m mast. Farr and colleagues describe it in The Shuttle Radar Topography Mission (Reviews of Geophysics, 2007). Rodríguez, Morris, and Belz checked it against ground truth worldwide in A global assessment of the SRTM performance (2006). Outside the United States it was distributed at 3 arc-seconds until the 1 arc-second global release began in September 2014. NASA's NASADEM is SRTM reprocessed with vertical control from the Ice, Cloud, and land Elevation Satellite (ICESat).

ASTER GDEM. Japan's Ministry of Economy, Trade and Industry and NASA built the ASTER Global Digital Elevation Model (GDEM) by stereo correlation of ASTER scenes. Tachikawa and colleagues described version 2 (IGARSS 2011), and Abrams, Crippen, and Fujisada documented version 3, released in August 2019 from 1.8 million scenes.

ALOS AW3D30. The Japan Aerospace Exploration Agency (JAXA) built ALOS World 3D 30 m from the archive of the PRISM stereo camera. PRISM, the Panchromatic Remote-sensing Instrument for Stereo Mapping, flew on the Advanced Land Observing Satellite (ALOS), which operated from 2006 to 2011. Tadono and colleagues report the method in Precise global DEM generation by ALOS PRISM (2014).

Copernicus GLO-30. The TerraSAR-X and TanDEM-X satellites flew in close formation and imaged each spot from two positions at once. Krieger and colleagues describe this synthetic aperture radar (SAR) formation in TanDEM-X: a satellite formation for high-resolution SAR interferometry (2007). Rizzoli and colleagues assessed the global TanDEM-X DEM (2017). The Copernicus DEM comes from the 2011 to 2015 acquisitions. Its handbook specifies an absolute vertical accuracy better than 4 m at 90 percent linear error: 90 percent of heights fall within 4 m of the truth. The data are on AWS Open Data as Cloud Optimized GeoTIFFs.

FABDEM. Hawker and colleagues used machine learning trained on airborne lidar to remove tree and building heights from Copernicus GLO-30. They describe the method in A 30 m global map of elevation with forests and buildings removed (Environmental Research Letters, 2022). Mean absolute vertical error fell from 1.61 to 1.12 m in built-up areas and from 5.15 to 2.88 m in forests.

USGS 3DEP. The 3D Elevation Program builds national bare-earth DEMs from airborne lidar. It serves them as 1 m project tiles and as seamless 1/3, 1, and 2 arc-second layers. A seamless layer has no gaps or edges between survey projects. The USGS reports an absolute vertical accuracy of about 0.82 m RMSE (root mean square error) for the seamless 1/3 arc-second layer. That figure covers the conterminous United States as of 2022.

EGM96, EGM2008, and NAVD88 vertical datums

Satellites measure heights above an ellipsoid, a smooth mathematical shape of the Earth. Most DEMs convert them to heights above a geoid, the surface of equal gravity potential that approximates mean sea level. The geoid rises above the ellipsoid in some regions and dips below it in others, so the two heights for one spot differ.

  • EGM96. The Earth gravity model from NASA Goddard, the National Imagery and Mapping Agency, and Ohio State, documented by Lemoine and colleagues (NASA TP-1998-206861). SRTM, ASTER GDEM, and AW3D30 heights refer to it.
  • EGM2008. Its successor, described by Pavlis and colleagues in The development and evaluation of the Earth Gravitational Model 2008 (2012). Copernicus GLO-30 and FABDEM use it.
  • NAVD88. The North American Vertical Datum of 1988, the datum of USGS 3DEP DEMs, built from ground leveling surveys. The National Geodetic Survey's GEOID18 converts GPS ellipsoid heights to NAVD88. The National Geodetic Survey (NGS) plans to replace NAVD88 with NAPGD2022, the North American-Pacific Geopotential Datum of 2022.

Slope, aspect, hillshade, flow, and viewshed derivatives

Slope and aspect. Slope is the steepest rate of height change at a cell, and aspect is the compass direction it faces. Both come from the east-west and north-south height gradients over the 3 by 3 window. Berthold Horn's method, from Hill shading and the reflectance map (Proceedings of the IEEE, 1981), weights the four cells beside the center twice as much as the four corners. Zevenbergen and Thorne fit a surface to the same nine cells in Quantitative analysis of land surface topography (1987). Their method also gives curvature. Skidmore compared the gradient methods (1989). Slope is reported in degrees or in percent rise: 45° is 100 percent.

Hillshade. Hillshade computes each cell's brightness from its slope and aspect, under a light at a chosen direction and height. Horn's 1981 paper set out the method for shaded relief maps.

Flow direction and accumulation. O'Callaghan and Mark's D8 method, in The extraction of drainage networks from digital elevation data (1984), sends all flow from a cell to the steepest of its eight neighbors. Counting the cells that drain through each cell gives flow accumulation, which traces streams. Freeman's multiple flow direction method (1991) spreads flow across all downslope neighbors, and Tarboton's D-infinity (1997) splits flow between the two neighbors closest to the steepest downhill direction. Pits, cells lower than all their neighbors, stop the routing. Barnes, Lehman, and Mulla's Priority-Flood (2014) fills pits in optimal time.

Viewshed. A viewshed marks every cell visible from an observer, by testing the line of sight to each cell. Peter Fisher showed in Algorithm and implementation uncertainty in viewshed analysis (1993) that different programs return different viewsheds from the same DEM. Visibility for a tower or a camera needs a surface model, because trees and buildings block the view.

Digital elevation model examples

  • Flood mapping. Hydraulic models route water across a terrain model to produce the depth grids behind flood risk data. SRTM heights sit on canopy and roofs, which places coastal land too high. Kulp and Strauss corrected this in CoastalDEM (2018). The correction roughly tripled the SRTM-based estimate of people living below projected 2100 high-tide lines. They reported the result in New elevation data triple estimates of global vulnerability to sea-level rise and coastal flooding (Nature Communications, 2019).
  • Watersheds. D8 flow direction and accumulation trace the streams and catchment boundaries behind runoff models.
  • Site selection. Engineers screen land by slope, cut-and-fill volume, and drainage before buying it, the step behind data center site selection.
  • Line of sight. Telecom planners compute viewsheds from towers over a surface model.
  • Solar siting. Slope and aspect set how much sun a slope receives.
  • Image correction. Satellite imagery and synthetic aperture radar are corrected with a DEM for the pixel shifts that relief causes.

Digital elevation model in Wherobots

WherobotsDB reads a DEM as a raster column and computes derivatives with map algebra in SQL. The walkthrough uses a box 8.5 km wide and 10 km tall over Boulder, Colorado, where the plains meet the Front Range foothills. Downtown lies to the east and Flagstaff Mountain to the west.

The query reads one table:

SourceFormatSizeWhat the query read
Copernicus DEM GLO-30, wherobots_open_data.copernicus_dem.glo_30mRaster table of 256 by 256 cell tiles in EPSG:4326, each with a footprint polygon3.96 million tiles (Data Hub introduction)Tile footprints to find the Boulder box, then the heights of the 6 tiles that touch it

GLO-30 is a surface model, so every value below is surface height in meters above EGM2008: the canopy or roof top where one exists, and the ground elsewhere.

The WherobotsDB documentation lists no built-in slope, aspect, or hillshade function. The query computes Horn's slope with RS_MapAlgebra, which runs map algebra: cell-by-cell arithmetic on a raster. Its scripts are written in the Jiffle language and can read a neighboring cell by its offset. Before the slope, the query finds the tiles, mosaics them, and converts cell size to meters:

  1. Find the tiles. A filter on the footprint polygons skips tiles outside the box. RS_Intersects keeps the tiles that touch the target grid.
  2. Mosaic them. A tiled DEM breaks the 3 by 3 window at every tile edge. RS_ReprojectMatch resamples each tile onto one target grid. The target grid uses the GLO-30 cell edges, so the cells line up with no offset. RS_Union_Aggr stacks the tiles as bands, and map algebra keeps the band with data in each cell. The grid carries a one-cell border so edge cells have neighbors.
  3. Convert cell size to meters. GLO-30 cells are 1 arc-second in both directions. At Boulder's latitude that is 23.7 m east-west and 30.8 m north-south on the WGS84 (World Geodetic System 1984) ellipsoid, and the slope formula needs both.
-- Surface height and Horn slope over Boulder, Colorado, from Copernicus DEM GLO-30
WITH grid AS (
  -- 360 x 324 cells of 1 arc-second on the GLO-30 cell lattice, plus a one-cell border
  -- so the 3 x 3 slope window has neighbors at the edges
  SELECT RS_MakeEmptyRaster(1, 'D', 362, 326, -105.32041666666666, 40.06041666666667,
                            1/3600.0, -1/3600.0, 0, 0, 4326) AS g
),
tiles AS (
  -- The 256 x 256 GLO-30 tiles that touch the grid, each resampled onto it
  SELECT /*+ BROADCAST(k) */ row_number() OVER (ORDER BY d.x, d.y) AS i,
         RS_ReprojectMatch(RS_SetBandNoDataValue(d.rast, 1, -32767), k.g, 'NearestNeighbor') AS r
  FROM wherobots_open_data.copernicus_dem.glo_30m d CROSS JOIN grid k
  WHERE ST_Intersects(d.footprint, ST_GeomFromText('POLYGON((-105.3205 39.9698, -105.2198 39.9698, -105.2198 40.0605, -105.3205 40.0605, -105.3205 39.9698))', 4326))
    AND RS_Intersects(d.rast, RS_Envelope(k.g))
),
stack AS (SELECT RS_Union_Aggr(r, i) AS s, COUNT(*) AS n FROM tiles),
dem AS (
  -- Mosaic: the six tiles are bands of one raster; keep the band with data in each cell
  SELECT n, RS_MapAlgebra(s, 'D',
    'out = max(max(max(rast[0], rast[1]), max(rast[2], rast[3])), max(rast[4], rast[5]));', -32767) AS z
  FROM stack
),
slope AS (
  -- Horn (1981) slope in degrees; rast[0][dx,dy] reads the neighbor at column offset dx, row offset dy.
  -- Cell size at 40.015 N on WGS84: 23.7153 m east-west, 30.8430 m north-south
  SELECT n, z, RS_MapAlgebra(z, 'D',
    'options { outside = 0; }
     dzdx = ((rast[0][1,-1] + 2*rast[0][1,0] + rast[0][1,1]) - (rast[0][-1,-1] + 2*rast[0][-1,0] + rast[0][-1,1])) / (8 * 23.7153);
     dzdy = ((rast[0][-1,1] + 2*rast[0][0,1] + rast[0][1,1]) - (rast[0][-1,-1] + 2*rast[0][0,-1] + rast[0][1,-1])) / (8 * 30.8430);
     out = atan(sqrt(dzdx*dzdx + dzdy*dzdy)) * 57.29577951308232;', -9999) AS sl
  FROM dem
),
px AS (
  -- One row per cell: surface height and slope
  SELECT n, w, p.pos, p.c.zz AS zz, p.c.ss AS ss
  FROM (SELECT n, RS_Width(z) AS w, arrays_zip(RS_BandAsArray(z, 1), RS_BandAsArray(sl, 1)) AS zs FROM slope)
  LATERAL VIEW posexplode(transform(zs, x -> named_struct('zz', x['0'], 'ss', x['1']))) p AS pos, c
)
-- Summary over the 360 x 324 interior (the border row and column are dropped)
SELECT MAX(n) AS tiles, MAX(w) AS w, COUNT(*) AS cells, COUNT_IF(zz = -32767) AS nodata,
       MIN(zz) AS zmin, MAX(zz) AS zmax, percentile(zz, 0.5) AS zmed, AVG(ss) AS mean_slope, MAX(ss) AS max_slope,
       COUNT_IF(ss < 5) AS s0_5, COUNT_IF(ss >= 5 AND ss < 15) AS s5_15, COUNT_IF(ss >= 15 AND ss < 30) AS s15_30, COUNT_IF(ss >= 30) AS s30
FROM px
WHERE floor(pos / 362) BETWEEN 1 AND 324 AND pos % 362 BETWEEN 1 AND 360

The query ran in 192 seconds, mosaicked 6 tiles, and returned 116,640 interior cells with no missing values:

ResultValue
Surface height, lowest to highest1,575.0 m to 2,473.6 m
Median surface height1,659.3 m
Mean slope8.83°
Steepest cell52.1°
Cells under 5°68,214
Cells from 5° to 15°20,340
Cells from 15° to 30°21,888
Cells of 30° and steeper6,198
Shaded slope map of an 8.5 km by 10 km box over Boulder, Colorado, from Copernicus GLO-30. The western third is foothills in yellow and pink, slopes of 15 to 30 degrees and 30 degrees and steeper, cut by drainages. The eastern two thirds is dark blue, under 5 degrees, with thin light blue lines of 5 to 15 degrees. A side panel lists a surface height range of 1,575 to 2,474 m, a median of 1,659 m, a mean slope of 8.8 degrees, and cell counts per slope class
Horn slope on Copernicus GLO-30 surface heights over Boulder: 68,214 of 116,640 cells are under 5°, and 6,198 are 30° or steeper.

More than half the box is flat city and plain. The steep classes sit in the foothills, where the surface climbs nearly 900 m above the lowest cell. On the flat plains, GLO-30 heights can step up at the edges of roofs, tree rows, and embankments. The slope formula reads each step as slope, which can produce the thin lines of 5° to 15°. Building-level slope for site screening needs a terrain model such as FABDEM or a 3DEP 1 m DEM.

RS_Value and RS_Values return the height or slope under points, and RS_ZonalStats returns the mean, minimum, or maximum inside parcels or footprints such as Overture buildings. Finer DEMs load with RS_FromPath as out-db rasters, which stay in their files until a query reads them. RS_Clip cuts a DEM to a boundary, and RS_Resample matches cell sizes before two DEMs are compared. Height above the nearest stream is a nearest-neighbor join between properties and a stream network. Raster and vector data run in one engine, so each of these is one query. Most stacks pick one of the two. The documentation marks RS_MapAlgebra as deprecated in favor of raster Python user-defined functions, which express the same window in NumPy.

An agent connected through the Wherobots Model Context Protocol (MCP) Server can write this SQL from a plain-language request. The models people use every day were trained on text, documents, databases, and the internet. Terrain heights joined to buildings and parcels in SQL give them facts about the physical world, the work of geospatial AI.

Digital elevation model research and what changes at scale

From contour maps to a global radar surface

After Miller and Laflamme's 1958 point model, mapping agencies digitized contour maps into grids through the 1970s and 1980s. The slope, flow, and gridding algorithms cited here appeared between 1981 and 1989. Moore, Grayson, and Ladson's review Digital terrain modelling (1991) gathered them for hydrology, geomorphology, and ecology. The flow methods still disagree: D8, Freeman's method, and D-infinity give different catchment areas from the same DEM.

Satellites then replaced contour maps as the source: SRTM in 2000, ASTER and ALOS stereo coverage to high latitudes, and the TanDEM-X surface model. Bielski and colleagues ranked the 1 arc-second products with the criteria of the Digital Elevation Model Intercomparison eXercise (DEMIX). Their paper is Novel approach for ranking DEMs (IEEE Transactions on Geoscience and Remote Sensing, 2024). They found Copernicus GLO-30 and FABDEM the best overall, slightly ahead of ALOS AW3D30 and clearly ahead of NASADEM, SRTM, and ASTER. Guth and colleagues ranked ten such DEMs on slope and curvature as well as height. They published the result as Ranking of 10 global one-arc-second DEMs reveals limitations in terrain morphology representation (Remote Sensing, 2024). Two DEMs with similar height error can give different slopes and curvatures.

Error and uncertainty

A DEM has error in every cell, and the error follows a spatial pattern. Fisher and Tate wrote Causes and consequences of error in digital elevation models (Progress in Physical Geography, 2006). They showed that errors pass from the input data into slope and other derivatives, and into the applications built on them. The usual accuracy statistics treat error as if it had no spatial pattern. Wechsler's review of uncertainties in DEMs for hydrologic applications (Hydrology and Earth System Sciences, 2007) set out the Monte Carlo approach. The approach adds realistic random error to the DEM many times, reruns the analysis, and reports the spread.

Surface bias, steep terrain, and time cause most of the error in global surface models:

  • Surface bias. Radar and stereo heights sit on canopy and roofs, which is why FABDEM and CoastalDEM exist.
  • Steep terrain. The Copernicus handbook specifies a relative vertical accuracy of 2 m on slopes up to 20 percent and 4 m above it. The handbook lists the models that fill radar voids, among them ASTER, SRTM, and AW3D30. One GLO-30 tile can mix sensors and epochs.
  • Time. Each DEM records one epoch: February 2000 for SRTM, 2011 to 2015 for GLO-30. Mining, landslides, glacier loss, and construction after that are absent.

What changes at scale

The GLO-30 table in Wherobots holds 3.96 million tiles, according to the Data Hub introduction. The derivative algorithms were designed for grids that fit in one machine's memory. Neighborhood operations need a halo at tile edges: a border of cells from the neighboring tiles. Flow accumulation is harder: a cell's value depends on every cell upstream. Barnes adapted Priority-Flood to trillion-cell DEMs (Computers & Geosciences, 2016) and filled a 2-trillion-cell DEM on 48 cores in 4.8 hours.

Much DEM work at scale is a join of terrain values to millions of parcels, buildings, or roads. Jia Yu, Jinxuan Wu, and Mohamed Sarwat introduced spatial processing on Apache Spark with GeoSpark (ACM SIGSPATIAL 2015). Yu, Zhang, and Sarwat described its partitioning, indexing, and spatial join design in Spatial data management in Apache Spark: the GeoSpark perspective and beyond (GeoInformatica, 2019). GeoSpark became Apache Sedona, whose raster functions run the map algebra in the query above. Raster processing at scale: the out-of-database architecture behind WherobotsDB covers why a query reads only the tiles under its area of interest.

Open problems

  • Bare earth everywhere. Global terrain models still come from correcting surface models, and spaceborne lidar samples narrow tracks across the globe.
  • Uncertainty as a layer. Few products ship per-cell error estimates that analysts can propagate into slope or flood depth.

Conclusions

The evidence here shows that what a digital elevation model can answer depends on its model type, cell size, datum, and epoch.

  1. A DEM's model type sets the questions it can answer. A surface model (Copernicus GLO-30, SRTM) fits line of sight. A terrain model (USGS 3DEP, FABDEM) fits drainage and flood depth, and surface minus terrain gives canopy height. FABDEM's correction cut forest error from 5.15 to 2.88 m.
  2. Copernicus GLO-30 is the free global DEM to start with. The DEMIX rankings put it and FABDEM first among 1 arc-second DEMs. Its handbook specifies vertical accuracy better than 4 m at 90 percent linear error.
  3. A 30 m surface DEM is enough for regional slope classes. Over Boulder, 68,214 of 116,640 cells fell under 5°. The hedge: the thin 5° to 15° lines across the plains can be roof and tree edges, so building-level slope needs 3DEP.
  4. Two DEMs can be compared only on one vertical datum. SRTM, ASTER GDEM, and AW3D30 use EGM96, GLO-30 and FABDEM use EGM2008, and 3DEP uses NAVD88. Any gap between datums lands in every cell of the difference.
  5. A tiled DEM needs a one-cell halo for 3 by 3 operations. Tile edges break the window, and flow accumulation needs every upstream tile. Boulder's six tiles became one bordered mosaic. Larger extents give each tile a halo.
  6. A DEM shows the ground on its acquisition dates. SRTM is February 2000 and GLO-30 is 2011 to 2015. Anything built, mined, or lost since is absent, so record the epoch.

Read more from Wherobots

Compute slope from the Copernicus DEM and join it to buildings in SQL with a Wherobots free trial at cloud.wherobots.com.

Frequently asked questions

What is a digital elevation model?

A digital elevation model (DEM) is a raster in which each cell stores the height of the Earth’s surface at that location. The grid is regular, with a known cell size and vertical datum. Global DEMs such as Copernicus GLO-30 and SRTM have 30 m cells; lidar-derived national DEMs such as USGS 3DEP reach 1 m. Slope, aspect, drainage, and visibility are all computed from a DEM.

What is the difference between a DEM, DTM, and DSM?

A digital elevation model (DEM) is the general term for a raster of heights, and agencies such as the USGS use it for bare earth. A digital terrain model (DTM) is bare ground, with buildings and vegetation removed. A digital surface model (DSM) is the first surface seen from above, including rooftops and tree canopy. DSM minus DTM gives the height of buildings and trees.

What is the difference between a DSM and a DTM?

A DSM records the top of whatever covers the ground: roofs, canopy, bridges. A DTM records the ground under them. Radar and stereo satellite products such as Copernicus GLO-30, SRTM, and AW3D30 are DSMs. Lidar ground returns, USGS 3DEP DEMs, and FABDEM are DTMs. Use a DSM for line of sight and a DTM for drainage and flood depth.

What resolution is a digital elevation model?

Digital elevation model resolution is the grid spacing. Global products such as Copernicus GLO-30, SRTM, ASTER GDEM, and AW3D30 use 1 arc-second, about 30 m. USGS 3DEP publishes 1 m DEMs from lidar and seamless 1/3, 1, and 2 arc-second layers. Vertical accuracy is a separate figure: better than 4 m (90 percent linear error) for GLO-30 and about 0.82 m RMSE for the 3DEP 1/3 arc-second layer.

Where can I download a free digital elevation model?

Copernicus GLO-30 is free on AWS Open Data and the Copernicus Data Space Ecosystem. SRTM and NASADEM are on NASA Earthdata and USGS EarthExplorer, ASTER GDEM is on NASA Earthdata, and AW3D30 is on JAXA’s site. USGS 3DEP DEMs for the United States are on The National Map. OpenTopography serves several of these global models and academic lidar surveys.

What is the best digital elevation model?

For a free global model, independent rankings put Copernicus GLO-30 and its bare-earth derivative FABDEM first among 1 arc-second DEMs. ALOS AW3D30 comes close behind, with SRTM, NASADEM, and ASTER GDEM further back. Use GLO-30 where a surface model fits, FABDEM where bare earth matters, and lidar-derived DEMs such as USGS 3DEP wherever they exist.

How much does a digital elevation model cost?

The major global 30 m DEMs are free: Copernicus GLO-30, SRTM, NASADEM, ASTER GDEM, and AW3D30. FABDEM is free for non-commercial use under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 license. USGS 3DEP data are public domain. Commercial vendors sell finer surface and terrain models from stereo satellite imagery or airborne surveys.

What is a digital elevation model used for?

A digital elevation model is used for flood modeling, watershed mapping, and slope and drainage screening in site selection. Telecom planners use it for line-of-sight and viewshed studies, and solar planners for sunlight and shading estimates. Paired with a surface model, it gives canopy height and biomass estimates. It is also the terrain input for correcting satellite imagery and radar.

What vertical datum does a DEM use?

Most global DEMs give heights above a geoid. SRTM, ASTER GDEM, and AW3D30 use EGM96; Copernicus GLO-30 and FABDEM use EGM2008. USGS 3DEP DEMs use NAVD88. Convert both models to the same datum before subtracting one DEM from another, or the offset between the datums ends up in every difference.

How is slope calculated from a DEM?

Slope is calculated from each cell’s 3 by 3 neighborhood. Horn’s 1981 method computes the east-west and north-south height change from weighted differences of the neighbors. The slope angle is the arctangent of the combined change. Zevenbergen and Thorne’s 1987 method fits a surface to the nine cells. On a geographic grid, convert the cell size from degrees to meters first.