Premium apps Part of RavingDesk
RavingDesk Elevation Profile from a DEM
Elevation profile along a line over your DEM: CSV, chart, climb, descent and grades.
Try an example: Across the synthetic hills: from the north-west hill to the south-east outlet · The WGS84 GeoTIFF version with latitude/longitude points and geodesic distances · Straight across a V-shaped valley (XYZ points) every 5 m
How it works
Samples your elevation model along a polyline with bilinear interpolation and measures the distances geodesically on the WGS84 ellipsoid (or in grid metres on local grids). Returns the profile as CSV and as a chart, the start, end, lowest and highest elevation, total climb and descent, the 3D length and the steepest and mean grade. Points can be cells, grid coordinates or coordinates in any notation (decimal degrees, DMS, UTM, MGRS, plus codes). It is the profile engine of RavingDesk’s Data & charts “Terrain” step.
- DEM reading: ESRI ASCII grids (xll/yll corner or centre, cellsize or dx/dy, NODATA_value); XYZ points on a regular grid (cell centres; missing positions become no data); GeoTIFF subset (one band of Int16, UInt16 or Float32, uncompressed or Deflate, strips or tiles, predictors 1–3, ModelTiepoint + ModelPixelScale or a north-up ModelTransformation, WGS84 EPSG:4326 or WGS84 UTM EPSG:326xx/327xx; other coordinate systems, LZW, BigTIFF and rotated grids are refused with a reason); PNG heightmaps (Terrarium, Mapbox Terrain-RGB or grey; transparent pixels are no data). Only files you supply are read — nothing is downloaded.
- Sampling: bilinear interpolation between the four surrounding cell centres (no-data corners are left out and the weights renormalised; inside the outer half cell the edge value is used). Default spacing is half the smallest cell size, at most 5,000 samples per profile; every line vertex is sampled exactly.
- Distances: on WGS84 grids the samples lie on the geodesic between the vertices (Karney’s direct problem) at equal geodesic spacing; on UTM grids the samples follow the straight map line and the distances between them are geodesic; on local grids distances are planar grid metres.
- Climb and descent add up every rise and fall between consecutive samples (no smoothing threshold); grades are rise over run between samples; the 3D length adds the elevation changes to the horizontal distance.
- Cell sizes on geographic grids come from the WGS84 radii of curvature at each row (meridional M and prime vertical N·cos φ) and cell areas from the exact ellipsoidal quadrangle; UTM and local grids use map metres (the UTM scale factor of 0.9996–1.0004 is ignored).
Sources
- GeoTIFF format specification 1.0 / OGC GeoTIFF 1.1 (Open Geospatial Consortium)
- Esri ASCII raster format (Esri)
- Algorithms for geodesics (J. Geodesy 87, 43–55) (C. F. F. Karney, 2013)
Part of RavingDesk
-
RavingDesk Paper trading & data workspace
Practise trading on paper and chart your data: orders, risk, datasets, analyses, reports.
Related tools
- RavingDesk Terrain Analyzer (DEM slope, aspect, hillshade, contours) – Slope, aspect, hillshade, curvature, sinks and contour lines from your elevation model.
- RavingDesk Watershed & Stream Network (D8 from a DEM) – Fill sinks, route flow (D8) and delineate the watershed and streams above a pour point.
- RavingDesk GPS File Converter (GPX ↔ KML ↔ GeoJSON) – Convert GPX, KML and GeoJSON, simplify tracks and get length, climb, descent and duration.
- RavingDesk Geodesic Distance & Bearing Calculator – Exact distance, bearings and midpoint between coordinates or along a route on WGS84.
How to use the RavingDesk Elevation Profile tool
Draw an elevation profile along a line over your own elevation model and get a CSV, a chart, climb, descent and grades with geodesic distances.
What it is for
How steep is the climb from the valley to the summit? Will a pipeline cross a ridge? Is the planned path wheelchair-friendly? An elevation profile answers such questions: it shows the height of the ground along a line.
This tool samples an elevation model you supply (ESRI ASCII grid, XYZ grid, GeoTIFF in WGS84 or UTM, or a PNG heightmap) along a polyline. It returns every sample as CSV, a chart with the line points marked A, B, C, and the totals people look for: length, climb and descent, lowest and highest point, steepest and mean grade, and the 3D length.
The line points can be grid cells (row 25, col 25), grid coordinates on local grids, or coordinates in any notation on georeferenced grids: decimal degrees, DMS, UTM, MGRS or plus codes.
Worked example
The second example uses a synthetic test terrain (a WGS84 GeoTIFF placed at 0° N, 0° E so nobody mistakes it for a real place) and three latitude/longitude points, from the north-west summit via a saddle to the valley outlet.
| Result | Value |
|---|---|
| Length | 2.50 km (geodesic) |
| Start → end | 477.8 → 306.7 m |
| Lowest / highest | 306.7 / 477.8 m |
| Climb / descent | 22.8 / 193.9 m |
| Steepest grade | 29.2 % |
| Mean grade | 8.7 % |
| 3D length | 2.52 km |
| Samples | 165, every 15.36 m |
The line points table shows the height at each vertex: A 477.76 m, B 341.79 m, C 306.68 m. On a local grid, the third example crosses a V-shaped valley every 5 m: 200 m long, 20 m down and 20 m up again, with a constant 20 % grade on both sides.
How to read the result
- Distances are geodesic on the WGS84 ellipsoid for georeferenced grids, the same method as the RavingDesk geodesic distance tool. Local grids use plain grid metres, and the result says which method was used.
- Climb and descent add up every rise and fall between samples. Noise in the data adds small extra metres.
- Grades are rise over run between neighbouring samples, in percent. 100 % is a 45° slope.
- The 3D length is the distance walked over the surface, slightly longer than the map length.
- The CSV has distance, map x/y, latitude/longitude (when known) and elevation for every sample.
Tips and common mistakes
- Put one point per line, in walking order. At least two points are needed, at most 500.
- On georeferenced grids,
52.5, 13.4means latitude first. Writerow 10, col 20to pick a cell instead. - The default spacing is half a cell. Finer spacing does not add detail that the DEM does not have, because elevations are interpolated between cell centres.
- Samples outside the grid have no elevation and are counted in a warning. The chart shows a gap there.
FAQ
Can I use a GPX track as the line?
Convert it with the RavingDesk GPS File Converter and paste the coordinates. In the RavingDesk app, a Terrain step can follow any dataset with latitude and longitude columns directly.
Why does the climb differ from my GPS watch?
GPS and barometric heights are noisy and measured where you walked. This profile uses the DEM surface along a straight or geodesic line between your points.
How exact are the elevations?
As exact as the DEM and its cell size. The tool interpolates bilinearly between the four nearest cell centres.
Can I get the profile as a chart image?
The result shows an SVG chart. In the app, the profile can also be exported as CSV next to the map.
Guide last updated:
For scripts and AI agents
- JSON API:
POST https://ravingdeskelevationprofile.usefulweb.site/api/v1/calculate(same calculation as this page) - Interface description: OpenAPI 3.1 · AI guide: llms.txt
- MCP server (Streamable HTTP):
https://ravingdeskelevationprofile.usefulweb.site/mcp· tool nameravingdesk_elevation_profile
Example request
curl -s -X POST https://ravingdeskelevationprofile.usefulweb.site/api/v1/calculate \
-H 'content-type: application/json' \
-d '{…see OpenAPI examples…}'