Closed wucangeo closed 6 years ago
Vector tiles and Geobuf are both encoded as protocol buffers (pbf) but with different .proto
schemas.
The new Protobuf(pbf);
should be able to do the first-level parsing of Geobuf, but the new VectorTile(new Protobuf(pbf));
will not know what to do with it since it decodes the vector tile schema, not the Geobuf one.
Got it!
I'm new to this, thank you for your patient explanation.
I'm still looking for a nodejs package to convert geojson to Protobuf
directly, one json to one pbf, could you give me a hint ?
Thanks a lot !
I think you're looking for https://github.com/mapbox/vt-pbf
@ericfischer That is I'm looking for, thanks a loooot! I appreciate it !
I'm looking for a tool to convert geojson to pbf file in my map , geobuf is a good one, so is tilelive and tippecanoe.
In my code, geometries are already cutted into slices. So, geobuf is the most suitable tool.
But, the pbf files which geobuf converted could not pass in pbf parser, however, result of tilelive and tippecanoe could.
Is this not a standard pbf file, or, my geojson in question?
Here is my parse code, it's from website. It parse other pbf files correctly.
Here is my geojson.
Here is tippecanoe's pbf file, I converted it to geojson.