postgis/lwgeom/lwgeom.h
Sandro Santilli b2ea45f8d6 Changed ptarray2d_construct interface.
git-svn-id: http://svn.osgeo.org/postgis/trunk@955 b70326c6-7e19-0410-871a-916f4a2858ee
2004-10-07 17:18:50 +00:00

42 lines
1.4 KiB
C

/*****************************************************************
* MEMORY MANAGEMENT
****************************************************************/
void *lwalloc(size_t size);
void *lwrealloc(void *mem, size_t size);
void lwfree(void *mem);
/*****************************************************************
* POINT
****************************************************************/
typedef struct { double x; double y; } POINT2D;
typedef struct { double x; double y; double m; } POINT3DM;
typedef struct { double x; double y; double z; } POINT3DZ;
typedef struct { double x; double y; double z; double m; } POINT4D;
/*****************************************************************
* POINTARRAY
****************************************************************/
typedef struct POINTARRAY_T *POINTARRAY;
// Constructs a POINTARRAY copying given 2d points
POINTARRAY ptarray_construct2d(unsigned int npoints, const POINT2D *pts);
/*****************************************************************
* LWGEOM
****************************************************************/
typedef struct LWGEOM_T *LWGEOM;
// Conversions
extern char *lwgeom_to_wkt(LWGEOM lwgeom);
// Construction
extern LWGEOM lwpoint_construct(int SRID, char wantbbox, POINTARRAY pa);
extern LWGEOM lwline_construct(int SRID, char wantbbox, POINTARRAY pa);
// Spatial functions
extern void lwgeom_reverse(LWGEOM lwgeom);
extern void lwgeom_forceRHR(LWGEOM lwgeom);