# Elevation ## Look up elevation at one or more points `ElevationLookupResult elevation().lookup(ElevationLookupParamsparams = ElevationLookupParams.none(), RequestOptionsrequestOptions = RequestOptions.none())` **get** `/api/v1/elevation` Look up elevation at one or more points ### Parameters - `ElevationLookupParams params` - `Optional lat` Latitude (single point) - `Optional lng` Longitude (single point) - `Optional locations` Pipe-separated lng,lat pairs (batch) - `Optional outputFields` Comma-separated property fields to include - `Optional outputInclude` Extra computed fields: bbox, center - `Optional outputPrecision` Coordinate decimal precision (1-15, default 7) ### Returns - `class ElevationLookupResult:` 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. - `GeoJsonGeometry geometry` 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. - `List` - `List>` - `List>>` - `List>>>` - `Type type` Geometry type - `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` - `FEATURE("Feature")` ### Example ```java package com.plazafyi.example; import com.plazafyi.client.PlazaClient; import com.plazafyi.client.okhttp.PlazaOkHttpClient; import com.plazafyi.models.elevation.ElevationLookupParams; import com.plazafyi.models.elevation.ElevationLookupResult; public final class Main { private Main() {} public static void main(String[] args) { PlazaClient client = PlazaOkHttpClient.fromEnv(); ElevationLookupResult elevationLookupResult = client.elevation().lookup(); } } ``` #### Response ```json { "geometry": { "coordinates": [ 2.3522, 48.8566 ], "type": "Point" }, "properties": { "elevation_m": 35.2 }, "type": "Feature" } ``` ## Look up elevation at one or more points `ElevationLookupResult elevation().lookupPost(ElevationLookupPostParamsparams = ElevationLookupPostParams.none(), RequestOptionsrequestOptions = RequestOptions.none())` **post** `/api/v1/elevation` Look up elevation at one or more points ### Parameters - `ElevationLookupPostParams params` - `Optional lat` Latitude (single point) - `Optional lng` Longitude (single point) - `Optional locations` Pipe-separated lng,lat pairs (batch) - `Optional outputFields` Comma-separated property fields to include - `Optional outputInclude` Extra computed fields: bbox, center - `Optional outputPrecision` Coordinate decimal precision (1-15, default 7) ### Returns - `class ElevationLookupResult:` 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. - `GeoJsonGeometry geometry` 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. - `List` - `List>` - `List>>` - `List>>>` - `Type type` Geometry type - `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` - `FEATURE("Feature")` ### Example ```java package com.plazafyi.example; import com.plazafyi.client.PlazaClient; import com.plazafyi.client.okhttp.PlazaOkHttpClient; import com.plazafyi.models.elevation.ElevationLookupPostParams; import com.plazafyi.models.elevation.ElevationLookupResult; public final class Main { private Main() {} public static void main(String[] args) { PlazaClient client = PlazaOkHttpClient.fromEnv(); ElevationLookupResult elevationLookupResult = client.elevation().lookupPost(); } } ``` #### Response ```json { "geometry": { "coordinates": [ 2.3522, 48.8566 ], "type": "Point" }, "properties": { "elevation_m": 35.2 }, "type": "Feature" } ``` ## Look up elevation for multiple coordinates `ElevationBatchResult elevation().batch(ElevationBatchParamsparams, RequestOptionsrequestOptions = RequestOptions.none())` **post** `/api/v1/elevation/batch` Look up elevation for multiple coordinates ### Parameters - `ElevationBatchParams params` - `List coordinates` Coordinates to look up elevations for (max 50) - `double lat` Latitude in decimal degrees (-90 to 90) - `double lng` Longitude in decimal degrees (-180 to 180) ### Returns - `class ElevationBatchResult:` GeoJSON FeatureCollection of elevation Point Features with 3D coordinates. Order matches the input coordinates array. - `List features` Elevation results in the same order as input coordinates - `GeoJsonGeometry geometry` 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. - `List` - `List>` - `List>>` - `List>>>` - `Type type` Geometry type - `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` - `FEATURE("Feature")` - `Type type` - `FEATURE_COLLECTION("FeatureCollection")` ### Example ```java 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); } } ``` #### Response ```json { "features": [ { "geometry": { "coordinates": [ 2.3522, 48.8566 ], "type": "Point" }, "properties": { "elevation_m": 35.2 }, "type": "Feature" } ], "type": "FeatureCollection" } ``` ## Elevation profile along coordinates `ElevationProfileResult elevation().profile(ElevationProfileParamsparams, RequestOptionsrequestOptions = RequestOptions.none())` **post** `/api/v1/elevation/profile` Elevation profile along coordinates ### Parameters - `ElevationProfileParams params` - `ElevationProfileRequest elevationProfileRequest` Request body for elevation profile along a path. Provide at least 2 coordinates defining the path. Maximum 50 coordinates per request. ### Returns - `class ElevationProfileResult:` GeoJSON LineString Feature with 3D coordinates [lng, lat, elevation] representing the elevation profile along the input path. Summary statistics are in properties. - `GeoJsonGeometry geometry` 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. - `List` - `List>` - `List>>` - `List>>>` - `Type type` Geometry type - `POINT("Point")` - `LINE_STRING("LineString")` - `POLYGON("Polygon")` - `MULTI_POINT("MultiPoint")` - `MULTI_LINE_STRING("MultiLineString")` - `MULTI_POLYGON("MultiPolygon")` - `Properties properties` Elevation profile summary statistics - `double avgElevationM` Average elevation along the profile in meters - `double maxElevationM` Maximum elevation along the profile in meters - `double minElevationM` Minimum elevation along the profile in meters - `double totalAscentM` Total cumulative elevation gain in meters - `double totalDescentM` Total cumulative elevation loss in meters - `Type type` - `FEATURE("Feature")` ### Example ```java package com.plazafyi.example; import com.plazafyi.client.PlazaClient; import com.plazafyi.client.okhttp.PlazaOkHttpClient; import com.plazafyi.models.elevation.ElevationProfileParams; import com.plazafyi.models.elevation.ElevationProfileRequest; import com.plazafyi.models.elevation.ElevationProfileResult; import java.util.List; public final class Main { private Main() {} public static void main(String[] args) { PlazaClient client = PlazaOkHttpClient.fromEnv(); ElevationProfileRequest params = ElevationProfileRequest.builder() .coordinates(List.of( ElevationProfileRequest.Coordinate.builder() .lat(48.8566) .lng(2.3522) .build(), ElevationProfileRequest.Coordinate.builder() .lat(48.858) .lng(2.34) .build(), ElevationProfileRequest.Coordinate.builder() .lat(48.8584) .lng(2.2945) .build() )) .build(); ElevationProfileResult elevationProfileResult = client.elevation().profile(params); } } ``` #### Response ```json { "geometry": { "coordinates": [ 2.3522, 48.8566 ], "type": "Point" }, "properties": { "avg_elevation_m": 67.8, "max_elevation_m": 155.3, "min_elevation_m": 28.1, "total_ascent_m": 127.4, "total_descent_m": 89.2 }, "type": "Feature" } ``` ## Domain Types ### Elevation Batch Result - `class ElevationBatchResult:` GeoJSON FeatureCollection of elevation Point Features with 3D coordinates. Order matches the input coordinates array. - `List features` Elevation results in the same order as input coordinates - `GeoJsonGeometry geometry` 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. - `List` - `List>` - `List>>` - `List>>>` - `Type type` Geometry type - `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` - `FEATURE("Feature")` - `Type type` - `FEATURE_COLLECTION("FeatureCollection")` ### Elevation Lookup Result - `class ElevationLookupResult:` 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. - `GeoJsonGeometry geometry` 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. - `List` - `List>` - `List>>` - `List>>>` - `Type type` Geometry type - `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` - `FEATURE("Feature")` ### Elevation Profile Request - `class ElevationProfileRequest:` Request body for elevation profile along a path. Provide at least 2 coordinates defining the path. Maximum 50 coordinates per request. - `List coordinates` Path coordinates in order of travel (min 2, max 50) - `double lat` Latitude in decimal degrees (-90 to 90) - `double lng` Longitude in decimal degrees (-180 to 180) ### Elevation Profile Result - `class ElevationProfileResult:` GeoJSON LineString Feature with 3D coordinates [lng, lat, elevation] representing the elevation profile along the input path. Summary statistics are in properties. - `GeoJsonGeometry geometry` 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. - `List` - `List>` - `List>>` - `List>>>` - `Type type` Geometry type - `POINT("Point")` - `LINE_STRING("LineString")` - `POLYGON("Polygon")` - `MULTI_POINT("MultiPoint")` - `MULTI_LINE_STRING("MultiLineString")` - `MULTI_POLYGON("MultiPolygon")` - `Properties properties` Elevation profile summary statistics - `double avgElevationM` Average elevation along the profile in meters - `double maxElevationM` Maximum elevation along the profile in meters - `double minElevationM` Minimum elevation along the profile in meters - `double totalAscentM` Total cumulative elevation gain in meters - `double totalDescentM` Total cumulative elevation loss in meters - `Type type` - `FEATURE("Feature")`