fips.covariance.distances.haversine_matrix#
- fips.covariance.distances.haversine_matrix(lats, lons)[source]#
Calculate the pairwise great-circle (haversine) distance matrix between points.
The Earth is a sphere of radius 6371 km.
- Parameters:
- Returns:
The matrix of distances in kilometers, zero on the diagonal.
- Return type:
- Raises:
ValueError – If lats or lons is not 1D.