Skip to content
GuidesPlaygroundDashboard

Elevation profile along coordinates

client.elevation.profile(ElevationProfileParams { geometry } body, RequestOptionsoptions?): ElevationProfileResult { geometry, properties, type }
POST/api/v1/elevation/profile

Elevation profile along coordinates

ParametersExpand Collapse
body: ElevationProfileParams { geometry }
geometry: GeoJsonGeometry { coordinates, type }

Path to profile (GeoJSON LineString geometry, minimum 2 points)

coordinates: Array<number> | Array<Array<number>> | Array<Array<Array<number>>> | Array<Array<Array<Array<number>>>>

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
Array<number>
Array<Array<number>>
Array<Array<Array<number>>>
Array<Array<Array<Array<number>>>>
type: "Point" | "LineString" | "Polygon" | 3 more
One of the following:
"Point"
"LineString"
"Polygon"
"MultiPoint"
"MultiLineString"
"MultiPolygon"
ReturnsExpand Collapse
ElevationProfileResult { geometry, properties, type }

GeoJSON LineString Feature with 3D coordinates representing an elevation profile

geometry: GeoJsonGeometry { coordinates, type }
coordinates: Array<number> | Array<Array<number>> | Array<Array<Array<number>>> | Array<Array<Array<Array<number>>>>

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
Array<number>
Array<Array<number>>
Array<Array<Array<number>>>
Array<Array<Array<Array<number>>>>
type: "Point" | "LineString" | "Polygon" | 3 more
One of the following:
"Point"
"LineString"
"Polygon"
"MultiPoint"
"MultiLineString"
"MultiPolygon"
properties: Properties { avg_elevation_m, max_elevation_m, min_elevation_m, 2 more }
avg_elevation_m?: number

Average elevation along profile

max_elevation_m?: number

Maximum elevation along profile

min_elevation_m?: number

Minimum elevation along profile

total_ascent_m?: number

Total elevation gain in meters

total_descent_m?: number

Total elevation loss in meters

type: "Feature"

Elevation profile along coordinates

import Plaza from '@plazafyi/sdk';

const client = new Plaza({
  apiKey: process.env['PLAZA_API_KEY'], // This is the default and can be omitted
});

const elevationProfileResult = await client.elevation.profile({
  geometry: { coordinates: [0], type: 'Point' },
});

console.log(elevationProfileResult.geometry);
Returns Examples