Thank you for the awesome library, however I am struggling to write GeoJSON from Boost Geometry and need guidance.
Given a generic Point of dimension N and using the design rationale defined in Boost Geometry docs, where the components of the points are accessed through free functions boost::geometry::get<N>(Point p) how to model writing it to JSON to have an output such as for a 3D point:
So please, can you give some guidance on how one would model generic Points, Linestrings, MultiLinestrings, etc... of Boost Geometry with Glaze in order to produce GeoJSON geometries? https://datatracker.ietf.org/doc/html/rfc7946
I currently work around the custom serialization with the generic json type glz::json_t json; and parse the strings into my model classes, but I believe you would be able to provide a more elegant way to solve the problem with a generic implementation, for which I am eager to learn.
Hi Stephen,
Thank you for the awesome library, however I am struggling to write GeoJSON from Boost Geometry and need guidance.
Given a generic Point of dimension N and using the design rationale defined in Boost Geometry docs, where the components of the points are accessed through free functions
boost::geometry::get<N>(Point p)
how to model writing it to JSON to have an output such as for a 3D point:The current hurdles are:
JSON
identifier which can't be resolved in version 3.4.1.So please, can you give some guidance on how one would model generic Points, Linestrings, MultiLinestrings, etc... of Boost Geometry with Glaze in order to produce GeoJSON geometries? https://datatracker.ietf.org/doc/html/rfc7946
I currently work around the custom serialization with the generic json type
glz::json_t json;
and parse the strings into my model classes, but I believe you would be able to provide a more elegant way to solve the problem with a generic implementation, for which I am eager to learn.Thank you,
Reference of a Linestring:
Reference of a MultiLinestring: