Elevation profile along coordinates
elevation.profile(**kwargs) -> ElevationProfileResult { geometry, properties, type }
POST/api/v1/elevation/profile
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(
coordinates: [{lat: 48.8566, lng: 2.3522}, {lat: 48.858, lng: 2.34}, {lat: 48.8584, lng: 2.2945}]
)
puts(elevation_profile_result){
"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"
}Returns Examples
{
"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"
}