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 On Monday, February 5, 2018 at 1:23:03 PM UTC-5, Brian Sorahan wrote: > > 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
