Solutions / Terrain

Terrain, elevation and contours

Add relief to an interactive map, retrieve ground height at a coordinate and generate contour geometry for terrain-aware products.

Live map example

Loading the Mapsource map…

Request / Response

Sample ground elevation

Read a terrain height and the underlying modeled sample for one coordinate.

API call

curl --fail-with-body "https://api.mapsource.io/elevation?lat=45.3735&lon=-121.6959" -H "Authorization: Bearer $MAPSOURCE_API_KEY"

Example response

{"schema":"elevation-query.v1","latitude":45.3735,"longitude":-121.6959,"elevationMeters":3410,"belowSeaLevel":false,"sampledMeters":3410,"resolutionZoom":12,"source":"mapzen-terrain-tiles","dataset":{"id":"mapzen-terrain-tiles","encoding":"terrarium"}}

Use the right terrain representation

Point samples answer a numeric question, Terrarium tiles drive hillshade and 3D maps, and contours turn elevation bands into vector geometry for display or analysis.

Keep source limits visible

Terrain is a modeled dataset with a published source, encoding and resolution. It supports visualization and geographic context; it is not a replacement for a site survey.

Service details

Built around a published contract

Inputs, outputs and limits remain inspectable in the generated API reference.

Point sample
GET /api/elevation
Map terrain
GET /api/terrain/{z}/{x}/{y}.png
Contours
GET /api/contours
Encoding
Terrarium raster DEM