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 1807 of file liblwgeom/lwgeom_geos.c.
1812 GEOSGeometry *g1, *g3;
1814 if (output < 0 || output > 2)
1816 lwerror(
"%s: invalid output type specified %d", __func__, output);
1827 g3 = GEOSDelaunayTriangulation(g1, tolerance, output == 1);
1830 GEOSSetSRID(g3, srid);
1838 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)
void lwgeom_set_srid(LWGEOM *geom, int32_t srid)
Set the SRID on an LWGEOM For collections, only the parent gets an SRID, all the children get SRID_UN...
#define FLAGS_GET_Z(flags)
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().