Skip to content
GuidesBlogPlaygroundDashboard
Routing & Navigation

Elevation

Look up elevation for points, batches, and profiles with ascent/descent stats.

Elevation data for any point on Earth: single lookups, batch queries, and profiles along a path with ascent/descent stats. All inputs use GeoJSON geometry objects.

POST a GeoJSON Point to get the elevation at that location:

Terminal window
curl -X POST https://plaza.fyi/api/v1/elevation \
-H "x-api-key: pk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"geometry": { "type": "Point", "coordinates": [6.8652, 45.8326] }
}'
import Plaza from "@plazafyi/sdk";
const client = new Plaza();
const el = await client.v1.elevation({
geometry: { type: "Point", coordinates: [6.8652, 45.8326] },
});
console.log(`${el.properties.elevation_m}m`); // 4808m (Mont Blanc summit)
import plaza
client = plaza.Client()
el = client.v1.elevation(geometry={"type": "Point", "coordinates": [6.8652, 45.8326]})
print(f"{el['properties']['elevation_m']}m")
import "github.com/plazafyi/plaza-go"
client := plaza.NewClient()
el, _ := client.V1.Elevation(ctx, plaza.ElevationParams{
Geometry: plaza.Point(6.8652, 45.8326),
})
fmt.Printf("%dm\n", el.Properties.ElevationM)

Response — a GeoJSON Feature with a 3D Point (longitude, latitude, elevation):

{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [6.8652, 45.8326, 4808]
},
"properties": {
"elevation_m": 4808
}
}

elevation_m is meters above sea level. Points in the ocean return 0.

POST a GeoJSON MultiPoint to get elevations for multiple points in one request:

Terminal window
curl -X POST https://plaza.fyi/api/v1/elevation \
-H "x-api-key: pk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"geometry": {
"type": "MultiPoint",
"coordinates": [
[6.8652, 45.8326],
[86.9250, 27.9881],
[-118.2923, 36.5785]
]
}
}'
const elevations = await client.v1.elevation({
geometry: {
type: "MultiPoint",
coordinates: [[6.8652, 45.8326], [86.925, 27.9881], [-118.2923, 36.5785]],
},
});

Returns a FeatureCollection with a 3D Point per input:

{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": { "type": "Point", "coordinates": [6.8652, 45.8326, 4808] },
"properties": { "elevation_m": 4808 }
},
{
"type": "Feature",
"geometry": { "type": "Point", "coordinates": [86.9250, 27.9881, 8849] },
"properties": { "elevation_m": 8849 }
},
{
"type": "Feature",
"geometry": { "type": "Point", "coordinates": [-118.2923, 36.5785, 4421] },
"properties": { "elevation_m": 4421 }
}
]
}

Maximum 50 points per request.

POST a GeoJSON LineString (at least 2 points) to get a 3D LineString with ascent/descent statistics:

Terminal window
curl -X POST https://plaza.fyi/api/v1/elevation \
-H "x-api-key: pk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"geometry": {
"type": "LineString",
"coordinates": [
[7.6500, 45.9764],
[7.6589, 45.9636],
[7.6617, 45.9537]
]
}
}'
const profile = await client.v1.elevation({
geometry: {
type: "LineString",
coordinates: [[7.65, 45.9764], [7.6589, 45.9636], [7.6617, 45.9537]],
},
});
console.log(`Total climb: ${profile.properties.total_ascent_m}m`);
console.log(`Total descent: ${profile.properties.total_descent_m}m`);

Response:

{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[7.6500, 45.9764, 2480],
[7.6589, 45.9636, 2634],
[7.6617, 45.9537, 2352]
]
},
"properties": {
"total_ascent_m": 342,
"total_descent_m": 128,
"min_elevation_m": 2150,
"max_elevation_m": 2634,
"avg_elevation_m": 2412
}
}

geometry.coordinates contains [lng, lat, elevation_m] triples. properties has summary stats for the full profile.

Hiking and cycling apps. Show elevation profiles alongside routes. Total climb matters more than peak elevation.

Gradient analysis. Sample densely along a route and compute grade between consecutive points. Flag sections steeper than 10%.

Flood risk. Batch-lookup elevation for building centroids. Compare against nearby water levels.

Route comparison. Same distance, different climb. The profile tells you which route is flatter.