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

Description Usage Arguments Value Author(s) See Also Examples

View source: R/LonLat2XY.R

Description

Convert a lon/lat coordinate to a tile coordinate for a given zoom. Decimal tile coordinates (x, y) are reported.

Usage

1
LonLat2XY(lon_deg, lat_deg, zoom, xpix = 256, ypix = 256)

Arguments

lon_deg

longitude in degrees

lat_deg

latitude in degrees

zoom

zoom

xpix

width of tile in pixels

ypix

length of tile in pixels

Value

a data frame with columns X, Y, x, y

Author(s)

David Kahle david.kahle@gmail.com, based on function LatLon2XY 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
## Not run: 
gc <- geocode('baylor university')
LonLat2XY(gc$lon, gc$lat, 10)


## End(Not run)


ggmap documentation built on May 19, 2017, 1:26 p.m.
Search within the ggmap package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.