PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ lwtype_is_collection()

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 1048 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().

1049 {
1050 
1051  switch (type)
1052  {
1053  case MULTIPOINTTYPE:
1054  case MULTILINETYPE:
1055  case MULTIPOLYGONTYPE:
1056  case COLLECTIONTYPE:
1057  case CURVEPOLYTYPE:
1058  case COMPOUNDTYPE:
1059  case MULTICURVETYPE:
1060  case MULTISURFACETYPE:
1061  case POLYHEDRALSURFACETYPE:
1062  case TINTYPE:
1063  return LW_TRUE;
1064  break;
1065 
1066  default:
1067  return LW_FALSE;
1068  }
1069 }
#define MULTICURVETYPE
Definition: liblwgeom.h:95
#define CURVEPOLYTYPE
Definition: liblwgeom.h:94
#define COMPOUNDTYPE
Definition: liblwgeom.h:93
#define MULTIPOINTTYPE
Definition: liblwgeom.h:88
#define POLYHEDRALSURFACETYPE
Definition: liblwgeom.h:97
#define LW_FALSE
Definition: liblwgeom.h:77
#define LW_TRUE
Return types for functions with status returns.
Definition: liblwgeom.h:76
#define TINTYPE
Definition: liblwgeom.h:99
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:90
#define MULTISURFACETYPE
Definition: liblwgeom.h:96
type
Definition: ovdump.py:41
#define MULTILINETYPE
Definition: liblwgeom.h:89
#define COLLECTIONTYPE
Definition: liblwgeom.h:91
Here is the caller graph for this function: