[GIS] Vector tile formats — vector MBTiles and MVF

mbtilespbfvector

I'm trying to find out about vector tile formats. There doesn't seem to be any documentation on vector MBTiles. ( https://github.com/mapbox/mbtiles-spec/issues/43 ). Can I regard vector MBTiles as a competitor to Mapbox Vector Tiles ? Or are they doing something different?

Best Answer

See https://github.com/osm2vectortiles/osm2vectortiles/issues/467 . MBTiles is a container (roughly, a SQLite database). It's normally used to hold PNGs or JPGs, and that's all the specification allows. But there's a widespread habit of storing Mapbox Vector Tiles inside the MBTiles database. As far as I can tell the main advantage of this is that you have all your tiles in one file, rather than having millions of tile files around.

Note that the individual vector tiles are sometimes (always?) zipped.

https://github.com/mapbox/mbutil can be used to extract the Mapbox Vector Tiles from the MBTiles file with mb-util --image_format=pbf. In the case I've examined, despite having the .pbf extension, the resulting tiles are really zips -- so unzip 2698.pbf to get 2698, which is the real PBF (Google ProtoBuf) file.

Related Question