Geodesic distance
calculate_distanceExact geodesic distance between two places or geometries on the WGS84 ellipsoid.
Use for any "how far" question instead of estimating. For NAMED places pass place_a and
place_b; the server geocodes them, so never type coordinates for a place yourself. Use
point_a/point_b only for coordinates the user gave or another tool returned. For lines
and polygons the distance is between their nearest points. Returns metres and kilometres.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| place_a | No | A place NAME, e.g. 'Adelaide Oval'; geocoded on the server (preferred) | |
| place_b | No | A place NAME, e.g. 'Adelaide Oval'; geocoded on the server (preferred) | |
| point_a | No | A GeoJSON geometry, e.g. {"type": "Point", "coordinates": [lon, lat]}; only for coordinates the user gave or a tool returned | |
| point_b | No | A GeoJSON geometry, e.g. {"type": "Point", "coordinates": [lon, lat]}; only for coordinates the user gave or a tool returned |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| units | No | Unit of each numeric field | |
| places | No | Named places as geocoded on the server: query, display_name, coordinates [lon, lat] | |
| status | No | ok | |
| warnings | No | Caveats to tell the user | |
| distance_m | Yes | Geodesic distance in metres (WGS84 ellipsoid) | |
| provenance | No | Source, licence, attribution, retrieval time and method | |
| distance_km | Yes |