Skip to content
GuidesBlogPlaygroundDashboard

Look up elevation at one or more points

client.elevation.lookupPost(ElevationLookupPostParams { format, lat, lng, 4 more } params?, RequestOptionsoptions?): ElevationLookupResult { geometry, properties, type }
POST/api/v1/elevation

Look up elevation at one or more points

ParametersExpand Collapse
params: ElevationLookupPostParams { format, lat, lng, 4 more }
format?: string

Response format: json (default), geojson, csv, ndjson

lat?: number

Latitude (single point)

lng?: number

Longitude (single point)

locations?: string

Pipe-separated lng,lat pairs (batch)

outputFields?: string

Comma-separated property fields to include

outputInclude?: string

Extra computed fields: bbox, center

outputPrecision?: number

Coordinate decimal precision (1-15, default 7)

ReturnsExpand Collapse
ElevationLookupResult { geometry, properties, type }

GeoJSON Point Feature with a 3D coordinate [lng, lat, elevation] per RFC 7946 §3.1.1. The elevation is also available in properties.elevation_m for convenience.

geometry: GeoJsonGeometry { coordinates, type }

GeoJSON Geometry object per RFC 7946. Coordinates use [longitude, latitude] order. 3D coordinates [lng, lat, elevation] are used for elevation endpoints.

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

Coordinates array. Nesting depth varies by geometry type: Point = [lng, lat], LineString = [[lng, lat], ...], Polygon = [[[lng, lat], ...], ...], etc.

One of the following:
Array<number>
Array<Array<number>>
Array<Array<Array<number>>>
Array<Array<Array<Array<number>>>>
type: "Point" | "LineString" | "Polygon" | 3 more

Geometry type

One of the following:
"Point"
"LineString"
"Polygon"
"MultiPoint"
"MultiLineString"
"MultiPolygon"
properties: Properties { elevation_m }
elevation_m: number

Elevation in meters above mean sea level (WGS84 EGM96 geoid)

type: "Feature"

Look up elevation at one or more points

import Plaza from '@plazafyi/sdk';

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

const elevationLookupResult = await client.elevation.lookupPost();

console.log(elevationLookupResult.geometry);
{
  "geometry": {
    "coordinates": [
      2.3522,
      48.8566
    ],
    "type": "Point"
  },
  "properties": {
    "elevation_m": 35.2
  },
  "type": "Feature"
}
Returns Examples
{
  "geometry": {
    "coordinates": [
      2.3522,
      48.8566
    ],
    "type": "Point"
  },
  "properties": {
    "elevation_m": 35.2
  },
  "type": "Feature"
}