Calculate Distance
AI-generatedSummary
Calculate the geodesic distance between two coordinate points via the Terranode Geospatial API.
Inputs
- lat1 (required) — Latitude of the first point
- lng1 (required) — Longitude of the first point
- lat2 (required) — Latitude of the second point
- lng2 (required) — Longitude of the second point
Output shape
Each input item returned with its JSON merged by the Terranode API distance calculation result.
Coordinates are validated as valid numbers within lat [-90,90] and lng [-180,180] before the API request.
Examples
Example 1: Calculate distance between New York City (40.7128, -74.0060) and London (51.5074, -0.1278)
lat1: 40.7128, lng1: -74.0060, lat2: 51.5074, lng2: -0.1278