Mapbox Vector Tile (MVT) and MVT Tileset Reader
Licensing options for this format begin with FME Professional Edition.
Overview
FME provides read access for Mapbox Vector Tile (MVT) tiles and tilesets. FME can read from a web address, a local file, or a local folder.
Tiles are spatially related collections of vector features that can be stored on one or more layers. Tiles can also be stored in groups called tilesets that contain tiles at the same zoom level. The tiles are contained in .mvt files, or compressed .mvt.gz files.
Layers are used to semantically group different vector features, and they can span multiple tiles (for example, rivers, roads, or vector features within a city).
Reader Overview
The MVT reader supports reading multiple one or more vector tiles from a URL or local file system. Each tile may contain any number of vector features of any supported geometry type, which then become features in FME.
The vector features are classified into different layers whose names and attributes become feature type names and attributes in FME. Layers can be defined in an optional metadata.json file at the root of a tileset which is read automatically when tiles are configured in a tile scheme.
Mapbox Vector Tile (MVT)
Reads single files from the local file system. Can also accept URLs and read single files or entire tilesets when the URL only specifies a zoom level. For example, https://b.tiles.mapbox.com/v4/<mapID>/15 will read all the tiles in the specified map at zoom level 15.
Select the reader Mapbox Vector Tile (MVT) File or URL when the dataset is a file or URL:
- File with the extensions .mvt or .mvt.gz.
- URL address to a tile or a tileset (for example, http[s]://path/to/some.mvt for a single tile and http[s]://path/to/{Z} for a tileset, where Z is the desired zoom level).
See also: Usage Notes.
Mapbox Vector Tile (MVT) Tileset
Reads entire tilesets that are in the specified directory zoom level. The directory hierarchy for a tileset must conform to the structure specified in the format usage notes – otherwise, the metadata may not be read correctly.
Select the reader Mapbox Vector Tile (MVT) Tileset to read a local folder.
Each layer in the vector tile corresponds with its own feature type. A tile may have multiple layers and therefore multiple feature types.
Are OpenStreetMap PBF files related to Mapbox Vector Tiles?
They are not related. PBFs are a format – much like XML – and can take many forms. Mapbox Vector Tiles and OpenStreetMap PBFs are protobuf files, but they conform to different specifications and protobuf schemas, and they are used in different ways. FME does not use this extension, but other MVT providers might.
Two readers exist help select different types of MVT datasets.
How FME Works with MVT Data
To access vector data, it helps to subdivide the data into smaller tiles according to a well-known tiling scheme, and store each tile. MapBox has created the MVT tile schema to store tiles and tilesets at different zoom levels and access them on either a server or local host. These tiles are stored in efficient protocol buffer files, vector tiles files, or compressed vector tiles files. See GDAL Documentation – MVT for more information on MVT file structure.
FME can read and analyze individual tiles or tilesets, filter them, organize them, and then output the results into a new tileset, or any other raster format. FME can also integrate raster imagery data from other formats (for example, orthophotos, satellite imagery, DEMs, or any other raster data) into a new or existing tileset.
You can use FME to perform simple operations, like resampling, reprojecting, clipping, or mosaicking raster data, but you can also use FME to perform more complex tasks like spatial operations.
Terminology in this Chapter
Term |
Definition or FME Representation |
---|---|
tile |
reader dataset |
tileset |
reader dataset |
layer |
feature type |
attribute |
attribute |
feature |
feature |
Usage Notes
- FME supports reading MapBox version 1 and 2.
- The MVT reader uses three integer coordinates, where z is the zoom level and (x,y) is the coordinate of the tile in the zoom level.