Take vertices of a geometry and build a delaunay triangulation on them.
- Parameters
-
geom | the input geometry |
tolerance | an optional snapping tolerance for improved robustness |
edgeOnly | if non-zero the result will be a MULTILINESTRING, otherwise it'll be a COLLECTION of polygons. |
Definition at line 1788 of file liblwgeom/lwgeom_geos.c.
1793 GEOSGeometry *g1, *g3;
1795 if (output < 0 || output > 2)
1797 lwerror(
"%s: invalid output type specified %d", __func__, output);
1808 g3 = GEOSDelaunayTriangulation(g1, tolerance, output == 1);
1811 GEOSSetSRID(g3, srid);
1819 lwerror(
"%s: cannot convert output geometry", __func__);
#define GEOS_FREE_AND_FAIL(...)
GEOSGeometry * LWGEOM2GEOS(const LWGEOM *lwgeom, uint8_t autofix)
LWGEOM * GEOS2LWGEOM(const GEOSGeometry *geom, uint8_t want3d)
void lwgeom_geos_error(const char *fmt,...)
LWTIN * lwtin_from_geos(const GEOSGeometry *geom, uint8_t want3d)
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
void lwgeom_set_srid(LWGEOM *geom, int srid)
Set the SRID on an LWGEOM For collections, only the parent gets an SRID, all the children get SRID_UN...
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
void lwnotice(const char *fmt,...)
Write a notice out to the notice handler.
References AUTOFIX, LWGEOM::flags, FLAGS_GET_Z, GEOS2LWGEOM(), GEOS_FAIL, GEOS_FREE, GEOS_FREE_AND_FAIL, lwerror(), LWGEOM2GEOS(), lwgeom_geos_error(), lwgeom_set_srid(), lwnotice(), lwtin_from_geos(), RESULT_SRID, and SRID_INVALID.
Referenced by ST_DelaunayTriangles(), and test_lwgeom_delaunay_triangulation().