Distance Matrix Haversine
distance_matrix_haversineStraight-line (great-circle) distance matrix from coordinates. FREE.
Typical input {"points": [{"id": "depot", "lat": 51.5, "lon": -0.12}, {"id": "A", "lat": 51.52, "lon": -0.1}]} returns {"matrix": [[0, 2.6], [2.6, 0]], "unit": "km", "kind": "straight-line (haversine), not road distance"}. Use when you have no road matrix and a straight-line approximation is acceptable, or to sanity-check one. Not road routing: real driving distances are longer and the difference is not uniform. Errors: on invalid, missing, or malformed input this tool never raises a protocol error — it returns {"error": ""} (for example {"error": "points must be a list of at least two objects"}). Every call is read-only and idempotent, so after correcting the input it is always safe to retry.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| unit | No | km (default) or mi. | km |
| points | Yes | list of {id, lat, lon} (up to 200). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||