distance_between_coordinates

HSTB.kluster.modules.georeference.distance_between_coordinates(lat_one, lon_one, lat_two, lon_two, ellipse_string='WGS84')

Use the pyproj inverse transformation to determine the distance between the given point(s). Can either be a single point, or an array of points

Parameters
  • lat_one (Union[float, ndarray]) – latitude of the initial point

  • lon_one (Union[float, ndarray]) – longitude of the initial point

  • lat_two (Union[float, ndarray]) – latitude of the terminus point

  • lon_two (Union[float, ndarray]) – longitude of the terminus point

  • ellipse_string (str) – initialization string for the geod object

Returns

either a float or an array of floats for the distance between the point(s), in meters

Return type

Union[float, np.ndarray]