Skip to content
GuidesBlogPlaygroundDashboard

Look up elevation for multiple coordinates

ElevationBatchResult elevation().batch(ElevationBatchParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/api/v1/elevation/batch

Look up elevation for multiple coordinates

ParametersExpand Collapse
ElevationBatchParams params
Optional<String> format

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

List<Coordinate> coordinates

Coordinates to look up elevations for (max 50)

double lat

Latitude in decimal degrees (-90 to 90)

maximum90
minimum-90
double lng

Longitude in decimal degrees (-180 to 180)

maximum180
minimum-180
ReturnsExpand Collapse
class ElevationBatchResult:

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

List<ElevationLookupResult> features

Elevation results in the same order as input coordinates

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

Coordinates coordinates

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

One of the following:
List<double>
List<List<double>>
List<List<List<double>>>
List<List<List<List<double>>>>
Type type

Geometry type

One of the following:
POINT("Point")
LINE_STRING("LineString")
POLYGON("Polygon")
MULTI_POINT("MultiPoint")
MULTI_LINE_STRING("MultiLineString")
MULTI_POLYGON("MultiPolygon")
Properties properties
double elevationM

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

Type type
Type type

Look up elevation for multiple coordinates

package com.plazafyi.example;

import com.plazafyi.client.PlazaClient;
import com.plazafyi.client.okhttp.PlazaOkHttpClient;
import com.plazafyi.models.elevation.ElevationBatchParams;
import com.plazafyi.models.elevation.ElevationBatchResult;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        PlazaClient client = PlazaOkHttpClient.fromEnv();

        ElevationBatchParams params = ElevationBatchParams.builder()
            .addCoordinate(ElevationBatchParams.Coordinate.builder()
                .lat(48.8566)
                .lng(2.3522)
                .build())
            .addCoordinate(ElevationBatchParams.Coordinate.builder()
                .lat(45.764)
                .lng(4.8357)
                .build())
            .build();
        ElevationBatchResult elevationBatchResult = client.elevation().batch(params);
    }
}
{
  "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"
}