PostGIS 3.0.6dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches
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*/
34LWGEOM* GEOS2LWGEOM(const GEOSGeometry* geom, uint8_t want3d);
35GEOSGeometry* LWGEOM2GEOS(const LWGEOM* g, uint8_t autofix);
36GEOSGeometry* GBOX2GEOS(const GBOX* g);
37#if POSTGIS_GEOS_VERSION < 38
38GEOSGeometry* LWGEOM_GEOS_buildArea(const GEOSGeometry* geom_in);
39GEOSGeometry* LWGEOM_GEOS_makeValid(const GEOSGeometry*);
40#endif
41
42GEOSGeometry* make_geos_point(double x, double y);
43GEOSGeometry* make_geos_segment(double x1, double y1, double x2, double y2);
44
45int cluster_intersecting(GEOSGeometry **geoms, uint32_t num_geoms, GEOSGeometry ***clusterGeoms, uint32_t *num_clusters);
46int cluster_within_distance(LWGEOM **geoms, uint32_t num_geoms, double tolerance, LWGEOM ***clusterGeoms, uint32_t *num_clusters);
47int union_dbscan(LWGEOM **geoms, uint32_t num_geoms, UNIONFIND *uf, double eps, uint32_t min_points, char **is_in_cluster_ret);
48
49POINTARRAY* ptarray_from_GEOSCoordSeq(const GEOSCoordSequence* cs, uint8_t want3d);
50
51extern char lwgeom_geos_errmsg[];
52extern void lwgeom_geos_error(const char* fmt, ...);
GEOSGeometry * GBOX2GEOS(const GBOX *g)
GEOSGeometry * make_geos_segment(double x1, double y1, double x2, double y2)
GEOSGeometry * make_geos_point(double x, double y)
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 * LWGEOM2GEOS(const LWGEOM *g, uint8_t autofix)
POINTARRAY * ptarray_from_GEOSCoordSeq(const GEOSCoordSequence *cs, uint8_t want3d)
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...
char lwgeom_geos_errmsg[]
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.