Skip to content
GuidesBlogPlaygroundDashboard

Look up elevation for multiple coordinates

elevation.batch(ElevationBatchParams**kwargs) -> ElevationBatchResult
POST/api/v1/elevation/batch

Look up elevation for multiple coordinates

ParametersExpand Collapse
coordinates: Iterable[Coordinate]

Coordinates to look up elevations for (max 50)

lat: float

Latitude in decimal degrees (-90 to 90)

maximum90
minimum-90
lng: float

Longitude in decimal degrees (-180 to 180)

maximum180
minimum-180
format: Optional[str]

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

ReturnsExpand Collapse
class ElevationBatchResult:

GeoJSON FeatureCollection of elevation Point Features with 3D coordinates. Order matches the input coordinates array.

features: List[ElevationLookupResult]

Elevation results in the same order as input coordinates

geometry: GeoJsonGeometry

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

coordinates: Union[List[float], List[List[float]], List[List[List[float]]], List[List[List[List[float]]]]]

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

One of the following:
List[float]

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

List[List[float]]

Array of [lng, lat] positions

List[List[List[float]]]

Array of linear rings / line strings

List[List[List[List[float]]]]

Array of polygons

type: Literal["Point", "LineString", "Polygon", 3 more]

Geometry type

One of the following:
"Point"
"LineString"
"Polygon"
"MultiPoint"
"MultiLineString"
"MultiPolygon"
properties: Properties
elevation_m: float

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

type: Literal["Feature"]
type: Literal["FeatureCollection"]

Look up elevation for multiple coordinates

import os
from plaza import Plaza

client = Plaza(
    api_key=os.environ.get("PLAZA_API_KEY"),  # This is the default and can be omitted
)
elevation_batch_result = client.elevation.batch(
    coordinates=[{
        "lat": 48.8566,
        "lng": 2.3522,
    }, {
        "lat": 45.764,
        "lng": 4.8357,
    }],
)
print(elevation_batch_result.features)
{
  "features": [
    {
      "geometry": {
        "coordinates": [
          2.3522,
          48.8566
        ],
        "type": "Point"
      },
      "properties": {
        "elevation_m": 35.2
      },
      "type": "Feature"
    }
  ],
  "type": "FeatureCollection"
}
Returns Examples
{
  "features": [
    {
      "geometry": {
        "coordinates": [
          2.3522,
          48.8566
        ],
        "type": "Point"
      },
      "properties": {
        "elevation_m": 35.2
      },
      "type": "Feature"
    }
  ],
  "type": "FeatureCollection"
}