Geodesic
Calculate points along an arbitrary great circle
Last updated
Calculate points along an arbitrary great circle
Last updated
This API is available on the Pro plan or higher
The /geodesic
end point calculates and returns points along the great circle connecting two points, start and end.
Two methods are available:
midpoint
: the points are calculated recursively, by finding the mid-point of the current coordinate pair, beginning with start and end, repeating the great circle calculation and then testing the difference in bearing. This is repeated until the difference is less than the specified tolerance
, in degrees. A lower tolerance results in a greater number of points
uniform
: the distance is calculated from start to end and then divided to give the specific number of segments. A great circle calculation is performed from the start point along the initial bearing (also known as forward azimuth) to the end point for the calculated distance, and then repeated as necessary for each segment
The end point can return either an array of points or a valid geojson object. You may specify the desired ellipsoid to be used for the calculations
You can request that the API return the elevation at each calculated point along the geodesic using the with-el
parameter. For details of the elevation data source, see the Elevation end point documentation.
Requesting elevation values increases both the response time and call cost.
/geodesic/{start}//{end}
Comma-separated values for latitude, longitude (negative west) in decimal degrees.
37.6,-122.3
Comma-separated values for latitude, longitude (negative west) in decimal degrees.
35.6,-3
Computation method
midpoint
midpoint
, uniform
Desired output format.
array
geojson
, array
Include elevation data in the results (incurs higher call cost)
1
Earth ellipsoid model (defaults to WGS84)
WGS84
WGS84
, GRS80
, GRS67
, ANS
, WGS72
, Clarke1858
, Clarke1880
, Sphere
, IAU1976
Calculation tolerance in degrees. Required if method is 'midpoint'
0.05
Number of segments. Required if method is 'uniform'
10