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

Description Usage Arguments Value Author(s) See Also Examples

View source: R/XY2LonLat.R

Description

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

Usage

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

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)

Author(s)

David Kahle david.kahle@gmail.com, based on function XY2LatLon by Markus Loecher, Sense Networks markus@sensenetworks.com in package RgoogleMaps

See Also

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

Examples

1
2
3
4
5
6
7
8
## Not run: 
XY2LonLat(480, 845, zoom = 11)
XY2LonLat(0, 0, zoom = 1)
XY2LonLat(0, 0, 255, 255, zoom = 1)
XY2LonLat(0, 0, 255, 255, zoom = 1)


## End(Not run)

ggmap documentation built on May 29, 2017, 3:39 p.m.

Search within the ggmap package
Search all R packages, documentation and source code