[postgis-devel] Is posible to use function lwgeom_to_geojson in another c fuctions

Jan Michálek godzilalalala at gmail.com
Fri Jun 24 13:34:16 PDT 2016


Hello
I need a advice about this problem
I'm trying to write some C fuction for making geojson as aggregate from
records as full regular geojson with properties.
I tried to use function lwgeom_to_geojson inside my code.

something like this

                case JSONTYPE_GEOM: //je;
                        {
                        LWGEOM *lwgeom;
                        lwgeom = lwgeom_from_gserialized(
                             (GSERIALIZED*)DatumGetPointer(val)
                              );
                        outputstr = lwgeom_to_geojson(lwgeom, 0, 0, false);
                        escape_json(result, outputstr);
                        pfree(outputstr);
                        break;
                        }



I have
#include "liblwgeom.h"
And I`m able to compile this. But if I try use function in postgre, it get
me an error
ERROR:  could not load library "/usr/lib/postgresql/jelejson.so":
/usr/lib/postgresql/jelejson.so: undefined symbol: lwgeom_to_geojson.

What i should do? Is posible to use this function like this?

Thanks Je;

-- 
Jelen
Starší čeledín datovýho chlíva
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20160624/7e7336af/attachment.html>


More information about the postgis-devel mailing list