Skip to content
GuidesPlaygroundDashboard

Elevation profile along coordinates

elevation.profile(**kwargs) -> ElevationProfileResult { geometry, properties, type }
POST/api/v1/elevation/profile

Elevation profile along coordinates

ParametersExpand Collapse
geometry: GeoJsonGeometry { coordinates, type }

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

coordinates: Array[Float] | Array[Array[Float]] | Array[Array[Array[Float]]] | Array[Array[Array[Array[Float]]]]

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
Array[Float]
Array[Array[Float]]
Array[Array[Array[Float]]]
Array[Array[Array[Array[Float]]]]
type: :Point | :LineString | :Polygon | 3 more
One of the following:
:Point
:LineString
:Polygon
:MultiPoint
:MultiLineString
:MultiPolygon
ReturnsExpand Collapse
class ElevationProfileResult { geometry, properties, type }

GeoJSON LineString Feature with 3D coordinates representing an elevation profile

geometry: GeoJsonGeometry { coordinates, type }
coordinates: Array[Float] | Array[Array[Float]] | Array[Array[Array[Float]]] | Array[Array[Array[Array[Float]]]]

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
Array[Float]
Array[Array[Float]]
Array[Array[Array[Float]]]
Array[Array[Array[Array[Float]]]]
type: :Point | :LineString | :Polygon | 3 more
One of the following:
:Point
:LineString
:Polygon
:MultiPoint
:MultiLineString
:MultiPolygon
properties: { avg_elevation_m, max_elevation_m, min_elevation_m, 2 more}
avg_elevation_m: Float

Average elevation along profile

max_elevation_m: Float

Maximum elevation along profile

min_elevation_m: Float

Minimum elevation along profile

total_ascent_m: Float

Total elevation gain in meters

total_descent_m: Float

Total elevation loss in meters

type: :Feature

Elevation profile along coordinates

require "plaza"

plaza = Plaza::Client.new(
  api_key: "My API Key",
  environment: "local" # defaults to "production"
)

elevation_profile_result = plaza.elevation.profile(geometry: {coordinates: [0], type: :Point})

puts(elevation_profile_result)
Returns Examples