Elevation data

Open-source tools for elevation, slope and GPX data

Last reviewed: Hilly & Kriss

Hillshade of Africa rendered in QGIS from a digital elevation model
Image: Vivepat, CC BY-SA 4.0, via Wikimedia Commons

Key takeaways

  • For desktop terrain analysis, QGIS (GPL-2.0) with GDAL (MIT) covers slope, aspect, hillshade and profiles; gdaldem slope -p outputs percent slope in one command.
  • GRASS GIS (GPL-2.0 or later) and WhiteboxTools (MIT) add hydrology and advanced terrain analysis; both run from the command line or inside QGIS.
  • To look up heights without downloading DEMs, Open Topo Data's public API allows 100 points per request and 1,000 requests per day; the IGN Géoplateforme altimetry service accepts up to 5,000 points per request for France.
  • Routing engines differ: BRouter and GraphHopper use elevation natively, Valhalla has an elevation service (Skadi), and OSRM only uses elevation through raster data in custom Lua profiles.

The core free toolkit for elevation work is QGIS plus GDAL: open a DEM, run gdaldem slope -p, and you have a percent-slope map in seconds. Around them sit specialist analysis engines (GRASS GIS, WhiteboxTools), elevation APIs (Open Topo Data, Open-Elevation, OpenTopography, the IGN Géoplateforme), elevation-aware routing engines (BRouter, GraphHopper, Valhalla) and GPX tools (GPXSee, GpsPrune, gpxpy). The table lists each with its licence as declared in its official repository in November 2026.

Tools at a glance

Tool Main use with elevation Licence Link
QGIS Desktop GIS: load DEMs, slope, aspect, hillshade, profiles, contours GPL-2.0 or later qgis.org
GDAL (gdaldem, gdalwarp) Command-line raster processing: slope, hillshade, reprojection, mosaics MIT-style gdal.org
GRASS GIS Advanced terrain and hydrology (r.slope.aspect, r.watershed, viewsheds) GPL-2.0 or later grass.osgeo.org
WhiteboxTools Geomorphometry and hydrology, hundreds of tools, CLI or QGIS plugin MIT github.com/jblindsay/whitebox-tools
Open Topo Data Elevation API, public or self-hosted (Docker) with your own DEMs MIT opentopodata.org
Open-Elevation Self-hostable elevation API GPL-2.0 github.com/Jorl17/open-elevation
OpenTopography Data portal and API for global DEMs and lidar (a service, not software; data licences vary) per dataset opentopography.org
IGN Géoplateforme altimetry Height and profile API for France (RGE ALTI and other resources) public service, content under Etalab 2.0 cartes.gouv.fr
BRouter Bike and hiking router with elevation-aware, configurable profiles MIT brouter.de
GraphHopper Routing engine; elevation from SRTM, CGIAR, GMTED and others Apache-2.0 github.com/graphhopper/graphhopper
Valhalla Routing engine with an elevation service (Skadi) and elevation-influenced bike routing MIT valhalla.github.io
OSRM Fast car-oriented routing; elevation only via raster data in Lua profiles BSD-2-Clause github.com/Project-OSRM/osrm-backend
GPXSee GPX/FIT viewer with elevation, speed and gradient graphs GPL-3.0 gpxsee.org
GpsPrune GPX viewer and editor, can add SRTM heights to a track GPL-2.0 activityworkshop.net
gpxpy Python library to parse GPX and compute uphill/downhill Apache-2.0 github.com/tkrajina/gpxpy
OpenTopoMap Topographic map style built from OSM and SRTM; map tiles CC BY-SA opentopomap.org

Desktop analysis: QGIS, GDAL, GRASS, WhiteboxTools

QGIS is the entry point. Drag a GeoTIFF from Copernicus, SRTM or a national LiDAR product into the map, then use Raster > Analysis > Slope (which wraps gdaldem) or the Elevation profile panel. The elevation data sources page explains which DEM to download.

GDAL does the same from a terminal, and scales to thousands of tiles. First reproject the DEM to a metric coordinate system, then compute slope in percent:

gdalwarp -t_srs EPSG:2154 -r bilinear dem_wgs84.tif dem_l93.tif
gdaldem slope dem_l93.tif slope_pct.tif -p -compute_edges
gdaldem hillshade dem_l93.tif hillshade.tif -multidirectional

-p outputs percent slope instead of degrees. If the DEM stays in latitude/longitude with heights in metres, the documented scale is -s 111120, which is only correct near the equator; since GDAL 3.11 the ratio is derived from the CRS automatically, but the documentation still advises reprojection at high latitudes. EPSG:2154 (Lambert-93) suits France; use the local UTM zone elsewhere. To convert the result into degrees or a 1:x ratio, see the slope converter.

GRASS GIS and WhiteboxTools go further: flow accumulation, watersheds, terrain ruggedness, viewsheds. Both are available as QGIS Processing providers, so you can mix them in one model.

Elevation APIs: heights without downloading DEMs

Open Topo Data has a public endpoint limited to 100 locations per request, 1 call per second and 1,000 calls per day, with datasets such as SRTM 30 m, ASTER 30 m, EU-DEM 25 m and the USA’s NED 10 m. For heavier use, clone the repository and run it with Docker on your own tiles. Open-Elevation is a similar self-hostable API.

For France, the IGN Géoplateforme exposes a calculation service:

https://data.geopf.fr/altimetrie/1.0/calcul/alti/rest/elevation.json?lon=1.48|1.49&lat=43.54|43.55&resource=ign_rge_alti_wld

It accepts up to 5,000 coordinate pairs per request and 5 requests per second per IP address, and an elevationLine endpoint returns a profile. Points outside coverage return -99999.

OpenTopography serves global DEMs and US lidar through an API that needs a free key for most datasets.

Routing engines and elevation

Elevation matters for routing on foot and by bike: the fastest route over a hill is not the shortest. BRouter was built for this and powers many cycling and hiking apps; its profiles weigh climbing explicitly. GraphHopper adds elevation when graph.elevation.provider is set (SRTM by default, or CGIAR, GMTED and LiDAR-based providers). Valhalla includes Skadi, a library and service for elevation data, and documents elevation-influenced bicycle routing. OSRM has no built-in elevation: its wiki shows how to load an SRTM ASCII grid into a Lua profile and penalise slopes yourself.

GPX tools

GPXSee opens GPX, FIT and many other formats and plots elevation, speed and gradient. GpsPrune edits tracks point by point and can replace GPS heights with SRTM values, which helps when the recorded altitude is noisy (see GPS elevation accuracy). gpxpy lets you script the same in Python, including uphill and downhill totals with smoothing. For a quick check without installing anything, the GPX elevation analyzer on this site parses the file locally in your browser.

Limits and good practice

  • Results inherit the DEM’s errors. A 30 m surface model gives smoothed slopes and phantom bumps in forests.
  • Slope depends on cell size: a short 25 % ramp visible on a 1 m LiDAR grid can be averaged down to a much gentler value on a 30 m grid.
  • Licences of tools and data are separate. GPL software can process data under any licence, but redistributing the data must follow the data licence; see open data and licences.
  • Public APIs have rate limits and no availability guarantee. Self-host for production.

Frequently asked questions

What is the best free software to calculate slope from a DEM?

QGIS, which calls GDAL's gdaldem under the hood, is the most accessible. From the command line, gdaldem slope with the -p option produces a percent slope raster directly.

Is there a free API for elevation data?

Yes. Open Topo Data offers a public API (100 locations per request, 1,000 calls per day) and can be self-hosted; for France, the IGN Géoplateforme altimetry service returns RGE ALTI heights for up to 5,000 points per request.

Does OSRM support elevation?

Not natively. OSRM can load third-party raster data such as SRTM into a Lua profile and use it to adjust speeds and weights, but you have to write that logic yourself.

Which open-source app can edit a GPX elevation profile?

GpsPrune can view and edit tracks, and look up heights from SRTM data. GPXSee is a fast viewer with elevation graphs, and gpxpy is a Python library for scripting.

Sources and open data

  1. gdaldem documentation, GDAL / OSGeo
  2. Open Topo Data, Open Topo Data
  3. Calcul altimétrique (Géoplateforme), IGN / cartes.gouv.fr
  4. Integrating third-party raster data (OSRM wiki), Project OSRM
  5. Elevation (GraphHopper documentation), GraphHopper
  6. QGIS, QGIS project / OSGeo