Closed captchanjack closed 2 years ago
Hi!
You'd have to
.proto
files that define the messages you want to decode. (Maybe it's just this one?)protojl
on them (see the docstring for more info)decode(ProtoDecoder(io_you_want_to_decode), TheGeneratedStructYouExpectToGetFromIO)
Basically what the example in the README does. Note that there is a new, breaking version of ProtoBuf.jl now.
At that point you should have your data in memory as Julia structs and you'd need to use a different package to translate them to GeoJSON format, possibly this one https://github.com/JuliaGeo/GeoJSON.jl.
Closing for now, but do reach out if you feel like the new docs could've been clearer on some of the above.
Hi,
I'm new to the world of protocol buffers, looking for some guidance here.
I have a fairly simple use case which is to decode protobuf messages from the mapbox API into GeoJSON format.
How would I approach this problem? Would I need to define a custom Julia struct according to this mapbox pbf specification? Or is there a simpler, more generic way of decoding the protobuf message into a Dict of some sort.
Essentially I would like to replicate what this python library is doing!
Thanks in advance...