from_meters_to_deg

from_meters_to_deg#

from_meters_to_deg(meters: float, lat: float | None = None, decimals: float = 7, average_lat_lon: bool = False) float[source]#

Approximately convert a distance in meters to a distance in degrees. Only true at the Equator. Very false for longitude distance elsewhere.

See https://wiki.openstreetmap.org/wiki/Precision_of_coordinates

Parameters:
  • meters (float) – Distance in meters

  • lat (float) – Latitude (useful if the distance is longitudinal)

  • decimals (float) – To round the distance, as the precision can be poor here. 7 decimals is equivalent to a centimetric precision

  • average_lat_lon (bool) – Average between lat distance and lon distance

Returns:

Distance in degrees

Return type:

float