Translates latitude and longitude at a given zoom level to row and column of a Mapbox Vector Tile.
Details
Mapbox Vector Tiles use a common addressing scheme shared with other web mapping services, such as Open Street Map Slippy Tiles. Tiles numbers are the same for any data source, based only on zoom level, latitude, and longitude. This function returns the tile row and column. Translated from Python and JavaScript, thanks to https://stackoverflow.com/questions/29218920/how-to-find-out-map-tile-coordinates-from-latitude-and-longitude
Examples
require(readMVT)
xml <- read.XML('https://umassdsl.webgis1.com/geoserver')
info <- layer.info(xml, 'DEPMEP:streams')
#> Error in layer.info(xml, "DEPMEP:streams"): Error in readMVT: layer DEPMEP:streams is missing
rc <- get.tile(10, 48.0096, -88.7712)