PostGIS  2.5.1dev-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 GEOSGeometry* LWGEOM_GEOS_buildArea(const GEOSGeometry* geom_in);
38 GEOSGeometry* LWGEOM_GEOS_makeValid(const GEOSGeometry*);
39 
40 GEOSGeometry* make_geos_point(double x, double y);
41 GEOSGeometry* make_geos_segment(double x1, double y1, double x2, double y2);
42 
43 int cluster_intersecting(GEOSGeometry **geoms, uint32_t num_geoms, GEOSGeometry ***clusterGeoms, uint32_t *num_clusters);
44 int cluster_within_distance(LWGEOM **geoms, uint32_t num_geoms, double tolerance, LWGEOM ***clusterGeoms, uint32_t *num_clusters);
45 int union_dbscan(LWGEOM **geoms, uint32_t num_geoms, UNIONFIND *uf, double eps, uint32_t min_points, char **is_in_cluster_ret);
46 
47 POINTARRAY* ptarray_from_GEOSCoordSeq(const GEOSCoordSequence* cs, uint8_t want3d);
48 
49 extern char lwgeom_geos_errmsg[];
50 extern void lwgeom_geos_error(const char* fmt, ...);
POINTARRAY * ptarray_from_GEOSCoordSeq(const GEOSCoordSequence *cs, uint8_t want3d)
GEOSGeometry * make_geos_segment(double x1, double y1, double x2, double y2)
LWGEOM * GEOS2LWGEOM(const GEOSGeometry *geom, uint8_t want3d)
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[]
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_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, uint8_t autofix)
unsigned char uint8_t
Definition: uthash.h:79
This library is the generic geometry handling section of PostGIS.
GEOSGeometry * LWGEOM_GEOS_buildArea(const GEOSGeometry *geom_in)