Skip to content
GuidesPlaygroundDashboard

Look up elevation for multiple coordinates

elevation.batch(**kwargs) -> ElevationBatchResult { features, type }
POST/api/v1/elevation/batch

Look up elevation for multiple coordinates

ParametersExpand Collapse
geometry: GeoJsonGeometry { coordinates, type }

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

coordinates: Array[Float] | Array[Array[Float]] | Array[Array[Array[Float]]] | Array[Array[Array[Array[Float]]]]

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
Array[Float]
Array[Array[Float]]
Array[Array[Array[Float]]]
Array[Array[Array[Array[Float]]]]
type: :Point | :LineString | :Polygon | 3 more
One of the following:
:Point
:LineString
:Polygon
:MultiPoint
:MultiLineString
:MultiPolygon
ReturnsExpand Collapse
class ElevationBatchResult { features, type }

GeoJSON FeatureCollection of elevation Point Features with 3D coordinates

features: Array[ElevationLookupResult { geometry, properties, type } ]

Elevation Point Features for each queried point

geometry: GeoJsonGeometry { coordinates, type }
coordinates: Array[Float] | Array[Array[Float]] | Array[Array[Array[Float]]] | Array[Array[Array[Array[Float]]]]

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
Array[Float]
Array[Array[Float]]
Array[Array[Array[Float]]]
Array[Array[Array[Array[Float]]]]
type: :Point | :LineString | :Polygon | 3 more
One of the following:
:Point
:LineString
:Polygon
:MultiPoint
:MultiLineString
:MultiPolygon
properties: { elevation_m}
elevation_m: Float

Elevation in meters above mean sea level

type: :Feature
type: :FeatureCollection

Look up elevation for multiple coordinates

require "plaza"

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

elevation_batch_result = plaza.elevation.batch(geometry: {coordinates: [0], type: :Point})

puts(elevation_batch_result)
Returns Examples