The DEM API allows you to retrieve elevation data and contour lines for your geometries.
X-API-Key
header.
GET /api/dem/
Get elevation data for a specific geometry.
Parameter | Type | Required | Description |
---|---|---|---|
geometry_id | UUID | Yes | UUID of the geometry |
format | string | No | Output format (geotiff, png, json). Default: geotiff |
resolution | number | No | Resolution in meters. Default: 30 |
colormap | string | No | Colormap for visualization (terrain, viridis, plasma, etc.). Default: terrain |
Name | Required | Description |
---|---|---|
X-API-Key | Yes | Your API key in UUID format |
Returns elevation data in the requested format.
{
"geometry_id": "123e4567-e89b-12d3-a456-426614174000",
"statistics": {
"min_elevation": 120.5,
"max_elevation": 450.2,
"mean_elevation": 285.7,
"std_deviation": 75.3
},
"resolution": 30,
"crs": "EPSG:4326",
"data": [
[120.5, 125.3, 130.2, ...],
[122.1, 128.7, 135.6, ...],
...
]
}
For GeoTIFF and PNG formats, the response will be the binary file data with appropriate content type headers.
Status Code | Description |
---|---|
400 | Bad Request - Missing or invalid parameters |
401 | Unauthorized - Missing API key |
403 | Forbidden - Invalid API key |
404 | Not Found - Geometry not found |
500 | Internal Server Error |
GET /api/contours/
Get contour lines for a specific geometry.
Parameter | Type | Required | Description |
---|---|---|---|
geometry_id | UUID | Yes | UUID of the geometry |
interval | number | No | Contour interval in meters. Default: 10 |
format | string | No | Output format (geojson, png). Default: geojson |
resolution | number | No | Resolution in meters for underlying DEM. Default: 30 |
Name | Required | Description |
---|---|---|
X-API-Key | Yes | Your API key in UUID format |
Returns contour lines in the requested format.
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[longitude1, latitude1],
[longitude2, latitude2],
...
]
},
"properties": {
"elevation": 100
}
},
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[longitude1, latitude1],
[longitude2, latitude2],
...
]
},
"properties": {
"elevation": 110
}
},
...
]
}
For PNG format, the response will be the binary image data with appropriate content type headers.
Status Code | Description |
---|---|
400 | Bad Request - Missing or invalid parameters |
401 | Unauthorized - Missing API key |
403 | Forbidden - Invalid API key |
404 | Not Found - Geometry not found |
500 | Internal Server Error |
The DEM API uses the following data sources:
Source | Resolution | Coverage | Description |
---|---|---|---|
SRTM | 30m | Global (60°N - 56°S) | Shuttle Radar Topography Mission data |
ASTER GDEM | 30m | Global (83°N - 83°S) | Advanced Spaceborne Thermal Emission and Reflection Radiometer Global Digital Elevation Model |
Copernicus DEM | 30m | Global | Digital Elevation Model from the Copernicus program |