[gdal-dev] Feature (geometry and attributes) to GeoJSON

Mateusz Loskot mateusz at loskot.net
Tue Jul 9 11:17:23 PDT 2013


On 9 July 2013 18:58, Baker, Anthony W <Anthony.W.Baker at boeing.com> wrote:
> Thank you for your response!
>
> Is it possible to use the json_object directly with something like
>        json_object *json = OGRGeoJSONWriteFeature(poFeature);
> Then just convert that to string?

I'm sure it is. You've got the source, you can include whatever
GDAL headers you like and use whatever is exposed from the binary.

> I seem to get an error in json_object.h when I try this method with "boolean redefinition".

You may need to apply some fixes for your compiler.

Best regards,
--
Mateusz  Loskot, http://mateusz.loskot.net


More information about the gdal-dev mailing list