PostGIS  2.3.7dev-r@@SVN_REVISION@@
int lwtype_is_collection ( uint8_t  type)

Return TRUE if the geometry may contain sub-geometries, i.e.

Determine whether a type number is a collection or not.

it is a MULTI* or COMPOUNDCURVE

Definition at line 1012 of file lwgeom.c.

References COLLECTIONTYPE, COMPOUNDTYPE, CURVEPOLYTYPE, LW_FALSE, LW_TRUE, MULTICURVETYPE, MULTILINETYPE, MULTIPOINTTYPE, MULTIPOLYGONTYPE, MULTISURFACETYPE, POLYHEDRALSURFACETYPE, and TINTYPE.

Referenced by circ_node_internal_new(), circ_tree_distance_tree_internal(), getTableInfo(), gserialized_is_empty_recurse(), lwcollection_construct(), lwcollection_construct_empty(), lwcollection_extract(), lwgeom_covers_lwgeom_sphere(), lwgeom_distance_spheroid(), lwgeom_is_collection(), lwgeom_length_spheroid(), lwgeom_nudge_geodetic(), ST_IsCollection(), and wkt_parser_set_dims().

1013 {
1014 
1015  switch (type)
1016  {
1017  case MULTIPOINTTYPE:
1018  case MULTILINETYPE:
1019  case MULTIPOLYGONTYPE:
1020  case COLLECTIONTYPE:
1021  case CURVEPOLYTYPE:
1022  case COMPOUNDTYPE:
1023  case MULTICURVETYPE:
1024  case MULTISURFACETYPE:
1025  case POLYHEDRALSURFACETYPE:
1026  case TINTYPE:
1027  return LW_TRUE;
1028  break;
1029 
1030  default:
1031  return LW_FALSE;
1032  }
1033 }
#define MULTICURVETYPE
Definition: liblwgeom.h:94
#define CURVEPOLYTYPE
Definition: liblwgeom.h:93
#define COMPOUNDTYPE
Definition: liblwgeom.h:92
#define MULTIPOINTTYPE
Definition: liblwgeom.h:87
#define POLYHEDRALSURFACETYPE
Definition: liblwgeom.h:96
#define LW_FALSE
Definition: liblwgeom.h:76
#define LW_TRUE
Return types for functions with status returns.
Definition: liblwgeom.h:75
#define TINTYPE
Definition: liblwgeom.h:98
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:89
#define MULTISURFACETYPE
Definition: liblwgeom.h:95
#define MULTILINETYPE
Definition: liblwgeom.h:88
#define COLLECTIONTYPE
Definition: liblwgeom.h:90

Here is the caller graph for this function: