Reads all necessary info for reading Mapbox Vector Tiles from a GeoServer.
Arguments
- xml
XML from getcapabilities. Use
read.XML()
to get this- layer
name of the layer, e.g., DEPMEP:streams
- crs
coordinate reference system. For Mapbox Vector Tiles, you'll want EPSG:900913 (= EPSG:3857)
Value
An MVT object, a four element list with:
layer: name of layer (colon converted to underscore)
box: bounding box (x-min, y-min, x-max, y-max)
tiles: n x 5 matrix of zoom level, rowmin, rowmax, colmin, colmax
url: constructed URL, with style and TileMatrixSet replaced, and TileMatrix replaced with zoom leaves zoom, TileRow, and TileCol to be replaced on reads
Details
Pulls necessary information for reading Mapbox Vector Tiles from a GeoServer's capabilities XML. Builds a template URL, with tags to be replaced by read.tile, when the target zoom level, row, and column are known.
Author
Bradley W. Compton bcompton@umass.edu