Skip to content
GuidesBlogPlaygroundDashboard

Look up elevation at one or more points

elevation.lookup_post(**kwargs) -> ElevationLookupResult { geometry, properties, type }
POST/api/v1/elevation

Look up elevation at one or more points

ParametersExpand Collapse
format_: String

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

lat: Float

Latitude (single point)

lng: Float

Longitude (single point)

locations: String

Pipe-separated lng,lat pairs (batch)

output_fields: String

Comma-separated property fields to include

output_include: String

Extra computed fields: bbox, center

output_precision: Integer

Coordinate decimal precision (1-15, default 7)

ReturnsExpand Collapse
class 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[Float] | Array[Array[Float]] | Array[Array[Array[Float]]] | Array[Array[Array[Array[Float]]]]

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

One of the following:
Array[Float]

[longitude, latitude] or [longitude, latitude, elevation]

Array[Array[Float]]

Array of [lng, lat] positions

Array[Array[Array[Float]]]

Array of linear rings / line strings

Array[Array[Array[Array[Float]]]]

Array of polygons

type: :Point | :LineString | :Polygon | 3 more

Geometry type

One of the following:
:Point
:LineString
:Polygon
:MultiPoint
:MultiLineString
:MultiPolygon
properties: { elevation_m}
elevation_m: Float

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

type: :Feature

Look up elevation at one or more points

require "plaza"

plaza = Plaza::Client.new(
  api_key: "My API Key",
  environment: "local" # defaults to "production"
)

elevation_lookup_result = plaza.elevation.lookup_post

puts(elevation_lookup_result)
{
  "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"
}