Elevation profile along coordinates
client.elevation.profile(ElevationProfileParams { coordinates } body, RequestOptionsoptions?): ElevationProfileResult { geometry, properties, type }
POST/api/v1/elevation/profile
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({
coordinates: [
{ lat: 48.8566, lng: 2.3522 },
{ lat: 48.858, lng: 2.34 },
{ lat: 48.8584, lng: 2.2945 },
],
});
console.log(elevationProfileResult.geometry);{
"geometry": {
"coordinates": [
2.3522,
48.8566
],
"type": "Point"
},
"properties": {
"avg_elevation_m": 67.8,
"max_elevation_m": 155.3,
"min_elevation_m": 28.1,
"total_ascent_m": 127.4,
"total_descent_m": 89.2
},
"type": "Feature"
}Returns Examples
{
"geometry": {
"coordinates": [
2.3522,
48.8566
],
"type": "Point"
},
"properties": {
"avg_elevation_m": 67.8,
"max_elevation_m": 155.3,
"min_elevation_m": 28.1,
"total_ascent_m": 127.4,
"total_descent_m": 89.2
},
"type": "Feature"
}