MapBox MBTiles Vector Tiles (MVT) Reader/Writer

Licensing options for this format begin with FME Desktop Professional Edition.

FME provides read and write access for MapBox MBTiles Vector Tiles (MBTiles MVT). MBTiles is a SQLite Database file format used to store tiles in a single file.

Overview

Tiles contain geometries that can either be raster-based (PNG, JPEG), or can contain compressed vector tile data conforming to the MVT specification.

Reader Overview

The reader can read from a local .mbtiles file with Protocolbuffer Binary Format (PBF) data, which refers to gzip-compressed vector tile data conforming to the MVT specification.

Writer Overview

The writer can write vector geometry and user attributes to an .mbtiles file with PBF format data.

The MBTiles MVT writer stores tile data inside a .mbtiles file. Tiles are generated in WebMercator (EPSG:3857) projection by default

The writer accepts input vector features from various layers and writes them as tiled data to a .mbtiles file at user-specified zoom levels.

Writer-Level Format Parameters

The MBTiles MVT writer supports additional options through the Mapbox MBTiles Vector Tiles (MBTiles MVT) Writer Parameters dialog.

FME supports reading and writing both version 1.0 and 1.1 .mbtiles files. When writing version 1.0 MBTiles data, the bounds and format metadata items will still be written to the metadata table.

Term Definition or FME Representation

Reader Overview

FME considers a single MBTiles file to be a dataset and prefers files with the .mbtiles extension.

The file must contain the tables tiles and metadata to be valid for reading with the MBTiles reader.

The reader allows for selecting subsets of data based on a user-provided spatial envelope and/or a specific zoom level.

Writer Overview

The MBTiles writer stores the MBTiles data inside an .mbtiles file.

The writer allows for creating subsets of data based on a user provided spatial envelope and/or a specific zoom level and allows various version, format and compression levels to be specified.

Writer-Level Format Parameters

The MBTiles writer supports additional options through the MapBox MBTiles Vector Tiles (MVT) Writer Feature Type Parameters dialog.

Technical Details

MBTile files contain at least two tables:

  • metadata: This table contains two columns – name and value – which are both strings used to identify the data in the tiles table.
  • tiles: This table contains four columns: tile_row, tile_column, zoom_level, and tile_data. tile_data is a binary blob which must contain vector tile data to be read by this reader. The other values must be integers.

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.

Usage Notes

  • This reader supports reading Mapbox MBTiles Specification version 1.3 with vector tile data.
  • Each layer in the vector tile corresponds to its own feature type. A Tile may have multiple layers, and therefore multiple feature types.