lwgeom = lwgeom_deserialize(SERIALIZED_FORM(geom));
/* alread a multi*, just make it a collection */
- if ( TYPE_GETTYPE(lwgeom->type) >= MULTIPOINTTYPE )
+ if ( lwgeom_contains_subgeoms(TYPE_GETTYPE(lwgeom->type)) )
{
TYPE_SETTYPE(lwgeom->type, COLLECTIONTYPE);
}
* in input. If bbox cache is not there we'll need to handle
* automatic bbox addition FOR_COMPLEX_GEOMS.
*/
- if ( TYPE_GETTYPE(geom->type) >= MULTIPOINTTYPE &&
+ if ( lwgeom_contains_subgeoms(TYPE_GETTYPE(geom->type)) &&
TYPE_HASBBOX(geom->type) )
{
PG_RETURN_POINTER(geom);
type = TYPE_GETTYPE(lwgeom->type);
/* single geom, make it a multi */
- if ( type < MULTIPOINTTYPE )
+ if ( ! lwgeom_contains_subgeoms(type) )
{
type += 3;
SRID = lwgeom->SRID;