Skip to content
GuidesBlogPlaygroundDashboard

Look up elevation for multiple coordinates

ElevationBatchResult Elevation.Batch(ElevationBatchParamsparameters, CancellationTokencancellationToken = default)
POST/api/v1/elevation/batch

Look up elevation for multiple coordinates

ParametersExpand Collapse
ElevationBatchParams parameters
required IReadOnlyList<Coordinate> coordinates

Body param: Coordinates to look up elevations for (max 50)

required Double Lat

Latitude in decimal degrees (-90 to 90)

maximum90
minimum-90
required Double Lng

Longitude in decimal degrees (-180 to 180)

maximum180
minimum-180
string format

Query param: 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.

required IReadOnlyList<ElevationLookupResult> Features

Elevation results in the same order as input coordinates

required GeoJsonGeometry Geometry

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

required Coordinates Coordinates

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

One of the following:
IReadOnlyList<Double>
IReadOnlyList<IReadOnlyList<Double>>
IReadOnlyList<IReadOnlyList<IReadOnlyList<Double>>>
IReadOnlyList<IReadOnlyList<IReadOnlyList<IReadOnlyList<Double>>>>
required Type Type

Geometry type

One of the following:
"Point"Point
"LineString"LineString
"Polygon"Polygon
"MultiPoint"MultiPoint
"MultiLineString"MultiLineString
"MultiPolygon"MultiPolygon
required Properties Properties
required Double ElevationM

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

required Type Type
required Type Type

Look up elevation for multiple coordinates

ElevationBatchParams parameters = new()
{
    Coordinates =
    [
        new()
        {
            Lat = 48.8566,
            Lng = 2.3522,
        },
        new()
        {
            Lat = 45.764,
            Lng = 4.8357,
        },
    ],
};

var elevationBatchResult = await client.Elevation.Batch(parameters);

Console.WriteLine(elevationBatchResult);
{
  "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"
}