pyguymer3.openstreetmap.zoom

pyguymer3.openstreetmap.zoom(lat_deg, res, /, *, scale=1)[source]

Calculate the required zoom to achieve a given resolution in the centre of a tile at a given latitude.

Parameters:
  • lat_deg (float) – the latitude (in degrees)

  • res (float) – the resolution (in metres/pixel)

  • scale (int, optional) – the scale of the tile

Returns:

zoomOfEarth – the zoom

Return type:

int

Notes

OpenStreetMap have tabulated a few values .

Copyright 2017 Thomas Guymer [1]

References