osm-tools: Tools converting from lat/lon coordinates to OSM tiles and...

osm-toolsR Documentation

Tools converting from lat/lon coordinates to OSM tiles and back.

Description

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

Usage

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

osmap


s-u/snippets documentation built on June 29, 2022, 6:42 a.m.