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 1124 of file liblwgeom/lwgeom_geos.c.
1125{
1129 GEOSGeometry *g1, *g3;
1130
1132
1133
1135
1137
1139
1140 g3 = GEOSBuildArea(g1);
1141
1143 GEOSSetSRID(g3, srid);
1144
1145
1146 if (GEOSGetNumGeometries(g3) == 0)
1147 {
1149 return NULL;
1150 }
1151
1154
1156
1158}
char result[OUT_DOUBLE_BUFFER_SIZE]
GEOSGeometry * LWGEOM2GEOS(const LWGEOM *lwgeom, uint8_t autofix)
#define GEOS_FREE_AND_FAIL(...)
void lwgeom_geos_error(const char *fmt,...)
void(*) LWGEOM GEOS2LWGEOM)(const GEOSGeometry *geom, uint8_t want3d)
#define FLAGS_GET_Z(flags)
LWPOLY * lwpoly_construct_empty(int32_t srid, char hasz, char hasm)
void lwnotice(const char *fmt,...) __attribute__((format(printf
Write a notice out to the notice handler.
static int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)
References AUTOFIX, LWGEOM::flags, FLAGS_GET_Z, GEOS_FAIL, GEOS_FREE, GEOS_FREE_AND_FAIL, LWGEOM2GEOS(), lwgeom_geos_error(), lwgeom_is_empty(), lwnotice(), lwpoly_construct_empty(), result, RESULT_SRID, and SRID_INVALID.
Referenced by _lwt_FaceByEdges(), buildarea1(), buildarea2(), buildarea3(), buildarea4(), buildarea4b(), buildarea5(), buildarea6(), buildarea7(), and ST_BuildArea().