# Geodesic

{% hint style="info" %}
This API is available on the **Pro** plan or higher
{% endhint %}

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

### Elevation

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](/geospatial/elevation.md) end point documentation.

{% hint style="warning" %}
Requesting elevation values increases both the response time and call cost.
{% endhint %}

{% openapi src="<https://api.radiantdrift.com/openapi/0.18.4.json>" path="/geodesic/{start}/{end}" method="get" %}
<https://api.radiantdrift.com/openapi/0.18.4.json>
{% endopenapi %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.radiantdrift.com/geospatial/geodesic.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
