How to convert GeoJSON to vector.pbf (Protobuf)?
Asked Answered
B

1

6

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!

Bolden answered 5/10, 2017 at 8:58 Comment(0)
P
8

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.

Pause answered 6/10, 2017 at 4:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.