Skip to content
GuidesPlaygroundDashboard

Elevation profile along coordinates

elevation().profile(ElevationProfileParamsparams, RequestOptionsrequestOptions = RequestOptions.none()) : ElevationProfileResult
POST/api/v1/elevation/profile

Elevation profile along coordinates

ParametersExpand Collapse
params: ElevationProfileParams
elevationProfileRequest: ElevationProfileRequest

Request body for elevation profile

ReturnsExpand Collapse
class ElevationProfileResult:

GeoJSON LineString Feature with 3D coordinates representing an elevation profile

geometry: GeoJsonGeometry
coordinates: Coordinates

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
List<Double>
List<List<Double>>
List<List<List<Double>>>
List<List<List<List<Double>>>>
type: Type
One of the following:
POINT("Point")
LINE_STRING("LineString")
POLYGON("Polygon")
MULTI_POINT("MultiPoint")
MULTI_LINE_STRING("MultiLineString")
MULTI_POLYGON("MultiPolygon")
properties: Properties
avgElevationM: Optional<Double>

Average elevation along profile

maxElevationM: Optional<Double>

Maximum elevation along profile

minElevationM: Optional<Double>

Minimum elevation along profile

totalAscentM: Optional<Double>

Total elevation gain in meters

totalDescentM: Optional<Double>

Total elevation loss in meters

type: Type

Elevation profile along coordinates

package com.plazafyi.example

import com.plazafyi.client.PlazaClient
import com.plazafyi.client.okhttp.PlazaOkHttpClient
import com.plazafyi.models.GeoJsonGeometry
import com.plazafyi.models.elevation.ElevationProfileParams
import com.plazafyi.models.elevation.ElevationProfileRequest
import com.plazafyi.models.elevation.ElevationProfileResult

fun main() {
    val client: PlazaClient = PlazaOkHttpClient.fromEnv()

    val params: ElevationProfileRequest = ElevationProfileRequest.builder()
        .geometry(GeoJsonGeometry.builder()
            .coordinatesOfDoubles(listOf(0.0))
            .type(GeoJsonGeometry.Type.POINT)
            .build())
        .build()
    val elevationProfileResult: ElevationProfileResult = client.elevation().profile(params)
}
Returns Examples