PostGIS  2.4.9dev-r@@SVN_REVISION@@
liblwgeom/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 2011 Sandro Santilli <strk@kbt.io>
22  *
23  **********************************************************************/
24 
25 
26 /* Workaround for GEOS 2.2 compatibility: old geos_c.h does not contain
27  header guards to protect from multiple inclusion */
28 #ifndef GEOS_C_INCLUDED
29 #define GEOS_C_INCLUDED
30 #include "geos_c.h"
31 #endif
32 
33 #include "liblwgeom.h"
34 #include "lwunionfind.h"
35 
36 /*
37 ** Public prototypes for GEOS utility functions.
38 */
39 LWGEOM *GEOS2LWGEOM(const GEOSGeometry *geom, char want3d);
40 GEOSGeometry * LWGEOM2GEOS(const LWGEOM *g, int autofix);
41 GEOSGeometry * GBOX2GEOS(const GBOX *g);
42 GEOSGeometry * LWGEOM_GEOS_buildArea(const GEOSGeometry* geom_in);
43 
44 GEOSGeometry * make_geos_point(double x, double y);
45 GEOSGeometry * make_geos_segment(double x1, double y1, double x2, double y2);
46 
47 int cluster_intersecting(GEOSGeometry** geoms, uint32_t num_geoms, GEOSGeometry*** clusterGeoms, uint32_t* num_clusters);
48 int cluster_within_distance(LWGEOM** geoms, uint32_t num_geoms, double tolerance, LWGEOM*** clusterGeoms, uint32_t* num_clusters);
49 int union_dbscan(LWGEOM** geoms, uint32_t num_geoms, UNIONFIND* uf, double eps, uint32_t min_points, char** is_in_cluster_ret);
50 
51 POINTARRAY *ptarray_from_GEOSCoordSeq(const GEOSCoordSequence *cs, char want3d);
52 
53 
54 extern char lwgeom_geos_errmsg[];
55 extern void lwgeom_geos_error(const char *fmt, ...);
56 
GEOSGeometry * make_geos_segment(double x1, double y1, double x2, double y2)
int cluster_intersecting(GEOSGeometry **geoms, uint32_t num_geoms, GEOSGeometry ***clusterGeoms, uint32_t *num_clusters)
Takes an array of GEOSGeometry* and constructs an array of GEOSGeometry*, where each element in the c...
def fmt
Definition: pixval.py:92
char lwgeom_geos_errmsg[]
int cluster_within_distance(LWGEOM **geoms, uint32_t num_geoms, double tolerance, LWGEOM ***clusterGeoms, uint32_t *num_clusters)
Takes an array of LWGEOM* and constructs an array of LWGEOM*, where each element in the constructed a...
GEOSGeometry * make_geos_point(double x, double y)
int union_dbscan(LWGEOM **geoms, uint32_t num_geoms, UNIONFIND *uf, double eps, uint32_t min_points, char **is_in_cluster_ret)
unsigned int uint32_t
Definition: uthash.h:78
GEOSGeometry * GBOX2GEOS(const GBOX *g)
void lwgeom_geos_error(const char *fmt,...)
const GEOSGeometry * geom
GEOSGeometry * LWGEOM2GEOS(const LWGEOM *g, int autofix)
LWGEOM * GEOS2LWGEOM(const GEOSGeometry *geom, char want3d)
POINTARRAY * ptarray_from_GEOSCoordSeq(const GEOSCoordSequence *cs, char want3d)
This library is the generic geometry handling section of PostGIS.
GEOSGeometry * LWGEOM_GEOS_buildArea(const GEOSGeometry *geom_in)