Learn R Programming

ggmap (version 2.5.2)

XY2LonLat: Convert a tile coordinate to a lon/lat coordinate

Description

Convert a tile coordinate to a lon/lat coordinate for a given zoom. Decimal tile coordinates are accepted.

Usage

XY2LonLat(X, Y, zoom, x = 0, y = 0, xpix = 256, ypix = 256)

Arguments

X
horizontal map-tile coordinate (0 is map-left)
Y
vertical map-tile coordinate (0 is map-top)
zoom
zoom
x
within tile x (0 is tile-left)
y
within tile y (0 it tile-top)
xpix
width of tile in pixels
ypix
length of tile in pixels

Value

  • a data frame with columns lon and lat (in degrees)

See Also

http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames

Examples

Run this code
XY2LonLat(480, 845, zoom = 11)

Run the code above in your browser using DataLab