Take a geometry and return an areal geometry (Polygon or MultiPolygon).
Actually a wrapper around GEOSpolygonize, transforming the resulting collection into a valid polygon Geometry.
Definition at line 1203 of file liblwgeom/lwgeom_geos.c.
1208 GEOSGeometry *g1, *g3;
1219 #if POSTGIS_GEOS_VERSION < 38
1222 g3 = GEOSBuildArea(g1);
1226 GEOSSetSRID(g3, srid);
1229 if (GEOSGetNumGeometries(g3) == 0)
#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,...)
GEOSGeometry * LWGEOM_GEOS_buildArea(const GEOSGeometry *geom_in)
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)
LWPOLY * lwpoly_construct_empty(int srid, char hasz, char hasm)
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, LWGEOM2GEOS(), LWGEOM_GEOS_buildArea(), lwgeom_geos_error(), lwgeom_is_empty(), lwnotice(), lwpoly_construct_empty(), RESULT_SRID, and SRID_INVALID.
Referenced by _lwt_FaceByEdges(), buildarea1(), buildarea2(), buildarea3(), buildarea4(), buildarea4b(), buildarea5(), buildarea6(), buildarea7(), and ST_BuildArea().