polaris.mesh.spherical.unified.river.distance.haversine_distance

polaris.mesh.spherical.unified.river.distance.haversine_distance(lon_a, lat_a, lon_b, lat_b)[source]

Compute great-circle distance in meters.

Parameters:
  • lon_a (float or array-like) – Longitude of the first point(s) in degrees.

  • lat_a (float or array-like) – Latitude of the first point(s) in degrees.

  • lon_b (float or array-like) – Longitude of the second point(s) in degrees.

  • lat_b (float or array-like) – Latitude of the second point(s) in degrees.

Returns:

float or array-like – Great-circle distance(s) in meters.