PostGIS  2.4.9dev-r@@SVN_REVISION@@
postgis/lwgeom_geos.h
Go to the documentation of this file.
1 /**********************************************************************
2  *
3  * PostGIS - Spatial Types for PostgreSQL
4  * http://postgis.net
5  *
6  * PostGIS is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * PostGIS is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with PostGIS. If not, see <http://www.gnu.org/licenses/>.
18  *
19  **********************************************************************
20  *
21  * Copyright 2008 Paul Ramsey <pramsey@cleverelephant.ca>
22  *
23  **********************************************************************/
24 
25 
26 #ifndef LWGEOM_GEOS_H_
27 #define LWGEOM_GEOS_H_ 1
28 
29 #include "../liblwgeom/lwgeom_geos.h" /* for GEOSGeom */
30 #include "liblwgeom.h" /* for GSERIALIZED */
31 #include "utils/array.h" /* for ArrayType */
32 
33 /*
34 ** Public prototypes for GEOS utility functions.
35 */
36 
37 GSERIALIZED *GEOS2POSTGIS(GEOSGeom geom, char want3d);
38 GEOSGeometry * POSTGIS2GEOS(GSERIALIZED *g);
39 GEOSGeometry** ARRAY2GEOS(ArrayType* array, uint32_t nelems, int* is3d, int* srid);
40 LWGEOM** ARRAY2LWGEOM(ArrayType* array, uint32_t nelems, int* is3d, int* srid);
41 
42 Datum geos_intersects(PG_FUNCTION_ARGS);
43 Datum geos_intersection(PG_FUNCTION_ARGS);
44 Datum geos_difference(PG_FUNCTION_ARGS);
45 Datum geos_geomunion(PG_FUNCTION_ARGS);
46 Datum LWGEOM_area_polygon(PG_FUNCTION_ARGS);
47 Datum LWGEOM_mindistance2d(PG_FUNCTION_ARGS);
48 Datum LWGEOM_mindistance3d(PG_FUNCTION_ARGS);
49 
51 uint32_t array_nelems_not_null(ArrayType* array);
52 
53 #endif /* LWGEOM_GEOS_H_ */
GEOSGeometry ** ARRAY2GEOS(ArrayType *array, uint32_t nelems, int *is3d, int *srid)
uint32_t array_nelems_not_null(ArrayType *array)
GEOSGeometry * POSTGIS2GEOS(GSERIALIZED *g)
LWGEOM ** ARRAY2LWGEOM(ArrayType *array, uint32_t nelems, int *is3d, int *srid)
Datum LWGEOM_mindistance2d(PG_FUNCTION_ARGS)
Datum geos_geomunion(PG_FUNCTION_ARGS)
unsigned int uint32_t
Definition: uthash.h:78
const GEOSGeometry * geom
Datum LWGEOM_mindistance3d(PG_FUNCTION_ARGS)
Datum LWGEOM_area_polygon(PG_FUNCTION_ARGS)
Datum geos_intersects(PG_FUNCTION_ARGS)
GSERIALIZED * GEOS2POSTGIS(GEOSGeom geom, char want3d)
Datum geos_difference(PG_FUNCTION_ARGS)
Datum geos_intersection(PG_FUNCTION_ARGS)
This library is the generic geometry handling section of PostGIS.
void errorIfGeometryCollection(GSERIALIZED *g1, GSERIALIZED *g2)
Throws an ereport ERROR if either geometry is a COLLECTIONTYPE.