osm.ll2xy converts lat/lon coordinates to OpenStreetMap tile numbers. osm.xy2ll performs the inverse conversion.

osm.xy2ll(x, y, zoom = 16)
osm.ll2xy(lon, lat, zoom = 16)

Arguments

x

number of the tile in the x direction

y

number of the tile in the y direction

lon

longitude

lat

latitude

zoom

zoom factor of the tiles

Details

osm.ll2xy computes tile numbers for given latitude and longitude, osm.xy2ll does the inverse.

Value

osm.ll2xy returns a list with the components x and y

osm.xy2ll returns a list with the components lon and lat

See also