Hello.

I will start developing an extension to PostgreSQL next to PostGIS using the C 
language.

If my new type were:


CREATE TYPE mytype (.., .., .., geom geometry);

The creation of the structure in c, would be something like?

#include "liblwgeom.h"

Struct mytype
{
   Int32 id;
   LWGEOM lwgeom;

};


In the extension I will create new data types for PostgreSQL, but I would like 
to use the geometric objects that the PostGIS extension offers, such as POINT, 
LINE, POLYGON, etc. In addition to their input functions (wkt- ST_GeomFromText 
()), operators, index, etc.

In this case just importing the liblwgeom library would be enough to develop an 
extension to PostgreSQL / PostGIS?

Would you have any examples of such a project?

Thanks in advance!!

Reply via email to