0
votes

Is it possible to get elevation data for a set of lat/long coordinates? I'm using the Mapbox Directions API to find a path between two points and I need elevation data for each point on the path. I see from How to get elevation profile data from Mapbox that we can use the TileQuery API get the elevation for 1 point but I'm looking to make 1 query for all points (few hundred) along a path.

1
The answer in the linked question explicitly describes how to obtain elevation data for multiple points, and is authoritative. - Steve Bennett
@SteveBennett, the answer in the linked question suggests that I'd need to make multiple calls to to Mapbox to get the elevation data for multiple points along the path. Since there are a few hundred points on the path, I'd need to make a few hundred calls. Did I misunderstand that? Thanks. - steveres
Yes, I believe the linked answer makes that fairly clear: "...you then pass to the Tilequery API one at a time" - Steve Bennett

1 Answers

1
votes

It is possible in one single request using DEM Net Elevation API

https://api.elevationapi.com/api/Elevation/line/43,4/43.2,5.2?dataSet=SRTM_GL3&reduceResolution=0

This endpoint documented here will give you ALL data points between the two locations.