454{
459 int32_t srid;
461
462 POSTGIS_DEBUG(2, "LWGEOM_force_collection called");
463
464
465
466
467
468
470 {
471 PG_RETURN_POINTER(geom);
472 }
473
474
476
477
479 {
481 }
482
483
484 else
485 {
487
491 lwgeoms = palloc(
sizeof(
LWGEOM *));
492 lwgeoms[0] = lwgeom;
494 }
495
498
499 PG_FREE_IF_COPY(geom, 0);
500 PG_RETURN_POINTER(result);
501}
int gserialized_has_bbox(const GSERIALIZED *g)
Check if a GSERIALIZED has a bounding box without deserializing first.
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
uint32_t gserialized_get_type(const GSERIALIZED *g)
Extract the geometry type from the serialized form (it hides in the anonymous data area,...
LWCOLLECTION * lwcollection_construct(uint8_t type, int32_t srid, GBOX *bbox, uint32_t ngeoms, LWGEOM **geoms)
void lwgeom_free(LWGEOM *geom)
int lwgeom_is_collection(const LWGEOM *lwgeom)
Determine whether a LWGEOM can contain sub-geometries or not.
#define SRID_UNKNOWN
Unknown SRID value.
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)