osm-tools {snippets}R 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


[Package snippets version 0.1-1 Index]