protolite (version 2.1)

mapbox: Mapbox Vector Tiles

Description

Read Mapbox vector-tile (mvt) files and returns the list of layers.

Usage

read_mvt_data(data, as_latlon = TRUE, zxy = NULL)

read_mvt_sf(data, crs = 4326, zxy = NULL)

Arguments

data

url, path or raw vector with the mvt data

as_latlon

return the data as lat/lon instead of raw EPSG:3857 positions

zxy

vector of length 3 with respectively z (zoom), x (column) and y (row). For file/url in the standard ../{z}/{x}/{y}.mvt format, these are automatically inferred from the input path.

crs

desired output coordinate system (passed to sf::st_transform). Note that mvt input is always by definition 3857.