661 geoms = palloc(list_length(state->
geoms) *
sizeof(
LWGEOM*));
664 foreach (l, state->
geoms)
671 geoms[ngeoms++] = geom;
682 empty_type =
type > empty_type ?
type : empty_type;
700 gser_out = geometry_serialize(out);
721 PG_RETURN_POINTER(gser_out);
LWGEOM * lwcollection_as_lwgeom(const LWCOLLECTION *obj)
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.
LWGEOM * lwgeom_unaryunion_prec(const LWGEOM *geom1, double gridSize)
void lwcollection_free(LWCOLLECTION *col)
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)