Skip to content
GuidesPlaygroundDashboard

Look up elevation at one or more points

client.elevation.lookup(ElevationLookupParams { lat, lng, locations } query?, RequestOptionsoptions?): ElevationLookupResult { geometry, properties, type }
GET/api/v1/elevation

Look up elevation at one or more points

ParametersExpand Collapse
query: ElevationLookupParams { lat, lng, locations }
lat?: number

Latitude (single point)

lng?: number

Longitude (single point)

locations?: string

Pipe-separated lng,lat pairs (batch)

ReturnsExpand Collapse
ElevationLookupResult { geometry, properties, type }

GeoJSON Point Feature with 3D coordinate [lng, lat, elevation] (RFC 7946 §3.1.1)

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 { elevation_m }
elevation_m?: number

Elevation in meters above mean sea level

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.lookup();

console.log(elevationLookupResult.geometry);
Returns Examples