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

Leknín Řepánek godzilalalala at gmail.com
Sat Jun 25 09:14:27 PDT 2016


Thanks

I`m going to read this.

Je;

On Sat, Jun 25, 2016 at 07:08:53AM -0700, Paul Ramsey wrote:
> Writing extensions that use other extensions w/o a compile-time dependency is a
> little tricky, but not impossible, and very gratifying from a cleanliness point
> of view. Here is an example from ogr-fdw of looking up function Oids by name
> 
> https://github.com/pramsey/pgsql-ogr-fdw/blob/
> 7c5699a20371eb1230e28cd1d3be12c76ee0035c/ogr_fdw.c#L1229-L1263
> 
> Also, to get the generic input/output functions for a type (which in the case
> of PostGIS can be used to generate/consume hexewkb or ewkb) you don’t even need
> to look up the function, as the in/out/send/recv functions are all part of the
> type definition.
> 
> https://github.com/pramsey/pgsql-ogr-fdw/blob/
> 7c5699a20371eb1230e28cd1d3be12c76ee0035c/ogr_fdw.c#L1131-L1135
> 
> ATB,
> 
> P
> 
> 
>     I wrote my function using postgre libs only by make few changes in
>     row_to_json functions (this is not agregate, only something like first
>     step), but I`m not able to find oid for relevant function to
>     geometry_out in this
> 
> 

> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/postgis-devel




More information about the postgis-devel mailing list