[GENERAL] Development of an extension for PostgreSQL and PostGIS - Mailing list pgsql-general

From Fabiana Zioti
Subject [GENERAL] Development of an extension for PostgreSQL and PostGIS
Date
Msg-id CP1PR80MB074146A709916BE5C5E84CAFFD8C0@CP1PR80MB0741.lamprd80.prod.outlook.com
Whole thread Raw
Responses Re: [GENERAL] Development of an extension for PostgreSQL and PostGIS  (Paul Ramsey <pramsey@cleverelephant.ca>)
List pgsql-general

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!!

pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [GENERAL] Adding a new Clause in the Source Code
Next
From: Paul Ramsey
Date:
Subject: Re: [GENERAL] Development of an extension for PostgreSQL and PostGIS