PostGIS  2.5.7dev-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  * Copyright 2018 Darafei Praliaskouski <me@komzpa.net>
23  *
24  **********************************************************************/
25 
26 #include "geos_c.h"
27 
28 #include "liblwgeom.h"
29 #include "lwunionfind.h"
30 
31 /*
32 ** Public prototypes for GEOS utility functions.
33 */
34 LWGEOM* GEOS2LWGEOM(const GEOSGeometry* geom, uint8_t want3d);
35 GEOSGeometry* LWGEOM2GEOS(const LWGEOM* g, uint8_t autofix);
36 GEOSGeometry* GBOX2GEOS(const GBOX* g);
37 #if POSTGIS_GEOS_VERSION < 38
38 GEOSGeometry* LWGEOM_GEOS_buildArea(const GEOSGeometry* geom_in);
39 GEOSGeometry* LWGEOM_GEOS_makeValid(const GEOSGeometry*);
40 #endif
41 
42 GEOSGeometry* make_geos_point(double x, double y);
43 GEOSGeometry* make_geos_segment(double x1, double y1, double x2, double y2);
44 
45 int cluster_intersecting(GEOSGeometry **geoms, uint32_t num_geoms, GEOSGeometry ***clusterGeoms, uint32_t *num_clusters);
46 int cluster_within_distance(LWGEOM **geoms, uint32_t num_geoms, double tolerance, LWGEOM ***clusterGeoms, uint32_t *num_clusters);
47 int union_dbscan(LWGEOM **geoms, uint32_t num_geoms, UNIONFIND *uf, double eps, uint32_t min_points, char **is_in_cluster_ret);
48 
49 POINTARRAY* ptarray_from_GEOSCoordSeq(const GEOSCoordSequence* cs, uint8_t want3d);
50 
51 extern char lwgeom_geos_errmsg[];
52 extern void lwgeom_geos_error(const char* fmt, ...);
GEOSGeometry * GBOX2GEOS(const GBOX *g)
GEOSGeometry * make_geos_point(double x, double y)
GEOSGeometry * LWGEOM2GEOS(const LWGEOM *g, uint8_t autofix)
GEOSGeometry * LWGEOM_GEOS_makeValid(const GEOSGeometry *)
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_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...
GEOSGeometry * LWGEOM_GEOS_buildArea(const GEOSGeometry *geom_in)
LWGEOM * GEOS2LWGEOM(const GEOSGeometry *geom, uint8_t want3d)
char lwgeom_geos_errmsg[]
POINTARRAY * ptarray_from_GEOSCoordSeq(const GEOSCoordSequence *cs, uint8_t want3d)
void lwgeom_geos_error(const char *fmt,...)
int union_dbscan(LWGEOM **geoms, uint32_t num_geoms, UNIONFIND *uf, double eps, uint32_t min_points, char **is_in_cluster_ret)
This library is the generic geometry handling section of PostGIS.
def fmt
Definition: pixval.py:92
unsigned int uint32_t
Definition: uthash.h:78
unsigned char uint8_t
Definition: uthash.h:79