How can I parse *.vector.pbf about Mapbox vector tile map?

Viewed 8157
2 Answers

Regarding question #2, extracting PBF data

Using GDAL's ogr2ogr is the easiest method (I found). Given a file named 1583.vector.pbf decode it to a, for example, shapefile (folder) named output:

# cmd   show prog.  output format     output name     input name
ogr2ogr -progress -f "ESRI Shapefile" output          1583.vector.pbf 

Regarding question #3, creating PBF data

Use the same command as above but swap the input/outputs and output format:

# example source: https://gdal.org/drivers/vector/mvt.html
ogr2ogr -f MVT mytileset source.gpkg -dsco MAXZOOM=10
Related