Create a new LWGEOM of the appropriate MULTI* type.
Definition at line 333 of file lwgeom.c.
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, ovdump::type, and LWGEOM::type.
Referenced by LWGEOM_force_multi(), lwgeom_to_x3d3(), RASTER_setPixelValuesGeomval(), and rt_raster_surface().
359 box = ogeoms[0]->
bbox;
360 ogeoms[0]->
bbox = NULL;
LWCOLLECTION * lwcollection_construct(uint8_t type, int srid, GBOX *bbox, uint32_t ngeoms, LWGEOM **geoms)
#define SRID_UNKNOWN
Unknown SRID value.
uint8_t MULTITYPE[NUMTYPES]
Look-up for the correct MULTI* type promotion for singleton types.
LWGEOM * lwgeom_clone(const LWGEOM *lwgeom)
Clone LWGEOM object.
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members) ...
#define FLAGS_GET_M(flags)
void * lwalloc(size_t size)
LWCOLLECTION * lwcollection_construct_empty(uint8_t type, int srid, char hasz, char hasm)