xy_to_gridcells | R Documentation |
Converts between projected Web Mercator (EPSG:3857) coordinates in meters and quadtree grid cell indices. The conversion back from grid cell indices returns the coordinates of the lower left corner of the cell.
xy_to_gridcells(xy, zoom = 0L)
gridcells_to_xy(xyz)
xy |
Rows of Web Mercator coordinates in meters (x, y). |
zoom |
Zoom level(s) of the quadtree dividing the Earth into a square |
xyz |
Rows of zero-based, integer grid cell indices (x, y, zoom). |
xy <- cbind(x = 0, y = 0)
xyz <- xy_to_gridcells(xy, zoom = 1)
gridcells_to_xy(xyz)
xyz <- xy_to_gridcells(xy, zoom = 0)
gridcells_to_xy(xyz)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.