460{
465 int32_t srid;
467
468 POSTGIS_DEBUG(2, "LWGEOM_force_collection called");
469
470
471
472
473
474
476 {
477 PG_RETURN_POINTER(geom);
478 }
479
480
482
483
485 {
487 }
488
489
490 else
491 {
493
497 lwgeoms = palloc(
sizeof(
LWGEOM *));
498 lwgeoms[0] = lwgeom;
500 }
501
502 result = geometry_serialize(lwgeom);
504
505 PG_FREE_IF_COPY(geom, 0);
506 PG_RETURN_POINTER(
result);
507}
char result[OUT_DOUBLE_BUFFER_SIZE]
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 contains sub-geometries or not This basically just checks that the struct ...
#define SRID_UNKNOWN
Unknown SRID value.