Discussion:
[protobuf] multidimensional array for geojson
Brian Sorahan
2018-02-05 18:23:03 UTC
Permalink
I want to create a protobuf message used to (de)serialize geojson.
I've googled a lot and looked at this https://github.com/mapbox/geobuf but
I'm pretty sure they wrap their protobuf-generated types with handwritten
code, which means you can't just import that proto in another project and
have it work.
Nothing I've found seems to handle multi-dimensional arrays very well (e.g.
the "coordinates" field in GeoJSON geometries). For
example https://github.com/danvk/geojson-proto/blob/master/proto/geojson.proto#L20
I would like to find something that provides a message type that doesn't
need to be wrapped with handwritten code to handle geojson, and can handle
any valid geojson.
Is anyone aware of a way to do this?

Thanks!
--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
Edward Clark
2018-03-22 15:27:30 UTC
Permalink
Howdy Brian,

I am using ::google::protobuf::ListValue to represent the coordinates
section of GeoJson. Doing you can get the protobuf JSON serialization to
generate valid GeoJson, though, you still need to write custom code to
populate and read directly from the protobuf.

Hope this helps,
Ed
Post by Brian Sorahan
I want to create a protobuf message used to (de)serialize geojson.
I've googled a lot and looked at this https://github.com/mapbox/geobuf
but I'm pretty sure they wrap their protobuf-generated types with
handwritten code, which means you can't just import that proto in another
project and have it work.
Nothing I've found seems to handle multi-dimensional arrays very well
(e.g. the "coordinates" field in GeoJSON geometries). For example
https://github.com/danvk/geojson-proto/blob/master/proto/geojson.proto#L20
I would like to find something that provides a message type that doesn't
need to be wrapped with handwritten code to handle geojson, and can handle
any valid geojson.
Is anyone aware of a way to do this?
Thanks!
--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
Loading...