Take vertices of a geometry and build a delaunay triangulation on them.
2005 #if POSTGIS_GEOS_VERSION < 34 2006 lwerror(
"lwgeom_delaunay_triangulation: GEOS 3.4 or higher required");
2009 GEOSGeometry *g1, *g3;
2012 if (output < 0 || output > 2) {
2013 lwerror(
"lwgeom_delaunay_triangulation: invalid output type specified %d", output);
2027 g3 = GEOSDelaunayTriangulation(g1, tolerance, output == 1);
2030 GEOSGeom_destroy(g1);
2048 GEOSGeom_destroy(g3);
2050 if (lwgeom_result == NULL) {
2052 lwerror(
"lwgeom_delaunay_triangulation: GEOS2LWGEOM returned null");
2054 lwerror(
"lwgeom_delaunay_triangulation: lwtin_from_geos returned null");
2059 return lwgeom_result;
void lwnotice(const char *fmt,...)
Write a notice out to the notice handler.
char lwgeom_geos_errmsg[LWGEOM_GEOS_ERRMSG_MAXSIZE]
int32_t lwgeom_get_srid(const LWGEOM *geom)
Return SRID number.
LWTIN * lwtin_from_geos(const GEOSGeometry *geom, int want3d)
int lwgeom_has_z(const LWGEOM *geom)
Return LW_TRUE if geometry has Z ordinates.
void lwgeom_geos_error(const char *fmt,...)
GEOSGeometry * LWGEOM2GEOS(const LWGEOM *lwgeom, int autofix)
LWGEOM * GEOS2LWGEOM(const GEOSGeometry *geom, char want3d)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.