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 1411 of file liblwgeom/lwgeom_geos.c.
References LWGEOM::flags, FLAGS_GET_Z, GEOS2LWGEOM(), LWDEBUG, LWDEBUGF, lwerror(), LWGEOM2GEOS(), LWGEOM_GEOS_buildArea(), lwgeom_geos_errmsg, lwgeom_geos_error(), lwgeom_is_empty(), lwnotice(), lwpoly_construct_empty(), and LWGEOM::srid.
Referenced by _lwt_FaceByEdges(), buildarea1(), buildarea2(), buildarea3(), buildarea4(), buildarea4b(), buildarea5(), buildarea6(), buildarea7(), and ST_BuildArea().
1413 GEOSGeometry* geos_in;
1414 GEOSGeometry* geos_out;
1416 int SRID = (int)(geom->
srid);
1425 LWDEBUG(3,
"buildarea called");
1427 LWDEBUGF(3,
"ST_BuildArea got geom @ %p", geom);
1439 GEOSGeom_destroy(geos_in);
1448 if ( GEOSGetNumGeometries(geos_out) == 0 )
1450 GEOSGeom_destroy(geos_out);
1455 GEOSGeom_destroy(geos_out);
1457 #if PARANOIA_LEVEL > 0 1458 if ( geom_out == NULL )
1460 lwerror(
"%s [%s] serialization error", __FILE__, __LINE__);
void lwnotice(const char *fmt,...)
Write a notice out to the notice handler.
char lwgeom_geos_errmsg[LWGEOM_GEOS_ERRMSG_MAXSIZE]
#define LWDEBUG(level, msg)
void lwgeom_geos_error(const char *fmt,...)
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
GEOSGeometry * LWGEOM2GEOS(const LWGEOM *lwgeom, int autofix)
LWPOLY * lwpoly_construct_empty(int srid, char hasz, char hasm)
LWGEOM * GEOS2LWGEOM(const GEOSGeometry *geom, char want3d)
int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members) ...
#define LWDEBUGF(level, msg,...)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
GEOSGeometry * LWGEOM_GEOS_buildArea(const GEOSGeometry *geom_in)