Skip to content
GuidesPlaygroundDashboard

Elevation profile along coordinates

elevation.profile(ElevationProfileParams**kwargs) -> ElevationProfileResult
POST/api/v1/elevation/profile

Elevation profile along coordinates

ParametersExpand Collapse

Path to profile (GeoJSON LineString geometry, minimum 2 points)

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

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
List[float]
List[List[float]]
List[List[List[float]]]
List[List[List[List[float]]]]
type: Literal["Point", "LineString", "Polygon", 3 more]
One of the following:
"Point"
"LineString"
"Polygon"
"MultiPoint"
"MultiLineString"
"MultiPolygon"
ReturnsExpand Collapse
class ElevationProfileResult:

GeoJSON LineString Feature with 3D coordinates representing an elevation profile

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

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
List[float]
List[List[float]]
List[List[List[float]]]
List[List[List[List[float]]]]
type: Literal["Point", "LineString", "Polygon", 3 more]
One of the following:
"Point"
"LineString"
"Polygon"
"MultiPoint"
"MultiLineString"
"MultiPolygon"
properties: Properties
avg_elevation_m: Optional[float]

Average elevation along profile

max_elevation_m: Optional[float]

Maximum elevation along profile

min_elevation_m: Optional[float]

Minimum elevation along profile

total_ascent_m: Optional[float]

Total elevation gain in meters

total_descent_m: Optional[float]

Total elevation loss in meters

type: Literal["Feature"]

Elevation profile along 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_profile_result = client.elevation.profile(
    geometry={
        "coordinates": [0],
        "type": "Point",
    },
)
print(elevation_profile_result.geometry)
Returns Examples