haversine

haversine(lon1, lat1, lon2, lat2, /)[source]

Calculate the great circle distance between two points on Earth, specified in degrees.

Parameters

lon1, lat1, lon2, lat2 (ndarray) – Coordinate arrays for the first and second point(s). If one pair is scalar, distances are calculated between the scalar pair and each element of the non-scalar pair. Otherwise, the pair shapes must be identical.

Returns

ndarray – Distances in km.