spatial_functions module
- spatial_functions.haversine(loc1, loc2, r=6371)[source]
Calculate the great circle distance between two points on the earth (specified in decimal degrees).
- Parameters:
loc1 (array_like) – Array of coordinates of first point.
loc2 (array_like) – Array of coordinates of second point.
r (float, optional) – Radius of earth in kilometers. Default is 6371.
- Returns:
The great circle distance between loc1 and loc2.
- Return type:
float