531 geoms = palloc(list_length(state->
geoms) *
sizeof(
LWGEOM*));
534 foreach (l, state->
geoms)
541 geoms[ngeoms++] = geom;
552 empty_type =
type > empty_type ?
type : empty_type;
564 GEOSGeometry *g = NULL;
565 GEOSGeometry *g_union = NULL;
573 g_union = GEOSUnaryUnion(g);
578 GEOSSetSRID(g_union, srid);
580 GEOSGeom_destroy(g_union);
601 PG_RETURN_POINTER(gser_out);
GEOSGeometry * LWGEOM2GEOS(const LWGEOM *lwgeom, uint8_t autofix)
void lwgeom_geos_error(const char *fmt,...)
int32_t lwgeom_get_srid(const LWGEOM *geom)
Return SRID number.
int lwgeom_has_z(const LWGEOM *geom)
Return LW_TRUE if geometry has Z ordinates.
LWCOLLECTION * lwcollection_construct(uint8_t type, int32_t srid, GBOX *bbox, uint32_t ngeoms, LWGEOM **geoms)
#define SRID_UNKNOWN
Unknown SRID value.
LWGEOM * lwgeom_construct_empty(uint8_t type, int32_t srid, char hasz, char hasm)
static uint32_t lwgeom_get_type(const LWGEOM *geom)
Return LWTYPE number.
static int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)
#define HANDLE_GEOS_ERROR(label)
GSERIALIZED * GEOS2POSTGIS(GEOSGeom geom, char want3d)
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)