API & MCP
Everything a person can do on RavingDesk Terrain Analyzer (DEM slope, aspect, hillshade, contours), a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://ravingdeskterrainanalyzer.usefulweb.site/api/v1/calculate– run RavingDesk Terrain Analyzer (DEM slope, aspect, hillshade, contours)GET https://ravingdeskterrainanalyzer.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
RavingDesk Terrain Analyzer (DEM slope, aspect, hillshade, contours)
Reads a digital elevation model you supply — ESRI ASCII grid, XYZ grid, GeoTIFF (WGS84 or UTM) or a Terrarium/Mapbox/grey PNG heightmap — and computes slope and aspect with Horn’s method, a hillshade for any sun position, Zevenbergen–Thorne curvature, closed depressions with Priority-Flood, contour lines as GeoJSON, and optionally cut/fill volumes against a reference elevation and a viewshed from an observer with earth curvature and refraction. Returns statistics, a PNG map and the contours. It is the terrain engine of RavingDesk’s Data & charts “Terrain” step.
| Field | Type | Default | Description |
|---|---|---|---|
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 (auto, geographic, utm, local) | "auto" | 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 (terrarium, mapbox, grey) | "terrarium" | 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) |
layer | select (elevation, hillshade, slope, aspect, curvature, fill, viewshed) | "elevation" | Map layer for the PNG |
azimuth | number | 315 | Sun azimuth (hillshade). Clockwise from north; 315° (north-west) is the cartographic convention. |
altitude | number | 45 | Sun altitude (hillshade) |
zFactor | number | 1 | Z factor. Multiplies elevations, e.g. 0.3048 when elevations are in feet and cells in metres. |
contourInterval | number | — | Contour interval. Empty: a round interval giving about 10–20 levels. |
referenceElevation | number | — | Reference elevation for cut and fill (optional). Volumes above (cut) and below (fill) a level plane at this elevation. |
observer | text | — | Observer for a viewshed (optional). A cell (“row 30, col 20”), grid coordinates “x, y” on local grids, or a coordinate in any notation on georeferenced grids. |
observerHeight | number | 1.7 | Observer eye height above ground |
earthCurvature | boolean | true | Earth curvature and refraction (k = 0.13) in the viewshed |
Every result contains
inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.
MCP (Model Context Protocol)
- Streamable HTTP endpoint:
https://ravingdeskterrainanalyzer.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
ravingdesk_terrain_analyzer - Local stdio connector:
node src/mcp-stdio.ts --tool=ravingdesk-terrain-analyzer
{
"mcpServers": {
"ravingdesk-terrain-analyzer": { "type": "http", "url": "https://ravingdeskterrainanalyzer.usefulweb.site/mcp" }
}
}