I have a big GeoJson file and I need to convert it to the vector format that can be loaded by the Mapbox. I need to have an external file, so I can't use Mapbox Studio for uploading and converting the data.
Currently I found https://github.com/mapbox/tippecanoe tool, but it converts GEoJSON to MBTiles (SQLite format). I think a can't use it for my map. As I can see from all the examples of the Mapbox service - it uses a XXX.vector.pbf (protobuf) format (small and fast). So the question is - how to get a Protobuf vector file from the original GeoJSON ? Thanks!
You can use QGIS to load your . pbf file and once you drag and drop the file on QGIS the data will be displayed as a layer on map, then: Right click on the layer > Save as > Change format Format: GeoJSON , choose the layer name and set COORDINATE_PRECISION=5 (recommended). And done!
Format. Vector tiles are encoded as Google Protobufs (PBF), which allow for serializing structured data. For clarity, Mapbox Vector Tiles use the . mvt file suffix. The specification details are largely structured around the rules implemented in the base .
Tippecanoe is probably the right answer: it generates a ton of .pbf files, and bundles them into a single .mbtiles file. Usually you then pass that .mbtiles file to a vector tile server (there are heaps), or upload it to Mapbox or something.
If you want to explode out the .mbtiles file, you can use mbutil.
Finally, if you want to translate GeoJSON directly into protobuf format (different from the Mapbox vector tile format, I think), you can use GeoBuf.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With