iwfm.gis.distance_ellipse

iwfm.gis.distance_ellipse(p1, p2, units='m')[source]

Use the Vincenty formula to calculate the distance between two (lat,lon) points on an ellipsoid Earth.

Vincenty formula at https://en.wikipedia.org/wiki/Vincenty%27s_formulae

Parameters:
  • p1 (list) – point coordinates as floats [latitude,longitude]

  • p2 (list) – point coordinates as floats [latitude,longitude]

  • units (str, default='m') – units, from ‘m’, ‘km’,’mi’ or ‘ft’

Returns:

distance – distance between p1 and p2

Return type:

float