Create a new LWGEOM of the appropriate MULTI* type.
Definition at line 380 of file lwgeom.c.
381{
386
388
390
392 {
398 );
399 }
400 else
401 {
404
405
406 box = ogeoms[0]->
bbox;
407 ogeoms[0]->
bbox = NULL;
409
411 }
412
413 return ogeom;
414}
LWCOLLECTION * lwcollection_construct(uint8_t type, int32_t srid, GBOX *bbox, uint32_t ngeoms, LWGEOM **geoms)
#define FLAGS_GET_Z(flags)
void * lwalloc(size_t size)
#define FLAGS_GET_M(flags)
LWCOLLECTION * lwcollection_construct_empty(uint8_t type, int32_t srid, char hasz, char hasm)
#define SRID_UNKNOWN
Unknown SRID value.
LWGEOM * lwgeom_clone(const LWGEOM *lwgeom)
Clone LWGEOM object.
uint8_t MULTITYPE[NUMTYPES]
Look-up for the correct MULTI* type promotion for singleton types.
static int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)
References LWGEOM::bbox, LWGEOM::flags, FLAGS_GET_M, FLAGS_GET_Z, lwalloc(), lwcollection_construct(), lwcollection_construct_empty(), lwgeom_clone(), lwgeom_is_empty(), MULTITYPE, LWGEOM::srid, SRID_UNKNOWN, and LWGEOM::type.
Referenced by LWGEOM_force_multi(), lwgeom_to_x3d3_sb(), postgis_valid_typmod(), RASTER_setPixelValuesGeomval(), and rt_raster_surface().