# RavingDesk Elevation Profile from a DEM > Elevation profile along a line over your DEM: CSV, chart, climb, descent and grades. 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. Part of usefulweb.app (https://usefulweb.app/). Part of [RavingDesk](https://ravingdesk.usefulweb.app/) (ownerApp: ravingdesk). Results are deterministic calculations from the inputs and the listed assumptions; the API returns exactly what the web page shows. ## Use it - Human interface: https://ravingdeskelevationprofile.usefulweb.app/ (interactive tool at https://ravingdeskelevationprofile.usefulweb.app/tool) - JSON API: POST https://ravingdeskelevationprofile.usefulweb.app/api/v1/calculate with a JSON object of inputs (schema: https://ravingdeskelevationprofile.usefulweb.app/api/v1/tool) - OpenAPI: https://ravingdeskelevationprofile.usefulweb.app/openapi.json - MCP (Streamable HTTP): https://ravingdeskelevationprofile.usefulweb.app/mcp - tool `ravingdesk_elevation_profile` ## Inputs - file (file): Elevation model (DEM) - ESRI ASCII grid (.asc), XYZ grid text, GeoTIFF (Int16, UInt16 or Float32, one band, uncompressed or Deflate, WGS84 or UTM) or a PNG heightmap. Up to 25 MB and 1,048,576 cells. - text (textarea): Or paste an ESRI ASCII grid or XYZ points - crs (select): Coordinate system of an ASCII or XYZ grid - GeoTIFFs carry their own coordinate system; PNG heightmaps are always local. - utmZone (text): UTM zone - Only for “WGS84 UTM zone”: zone number and N or S. - pngEncoding (select): PNG heightmap encoding - cellSize (number): Cell size of a PNG heightmap - PNG heightmaps and TIFFs without georeferencing have no cell size of their own. - greyMin (number): Elevation of black (grey PNG) - greyMax (number): Elevation of white (grey PNG) - line (textarea, required): Line points (one per line) - At least two points: cells (“row 10, col 10”), “x, y” on local grids, or coordinates in any notation on georeferenced grids. - stepM (number): Sample spacing - Empty: half the cell size (at most 5,000 samples). ## Method - 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).