PostGIS  2.2.8dev-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 999 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().

1000 {
1001 
1002  switch (type)
1003  {
1004  case MULTIPOINTTYPE:
1005  case MULTILINETYPE:
1006  case MULTIPOLYGONTYPE:
1007  case COLLECTIONTYPE:
1008  case CURVEPOLYTYPE:
1009  case COMPOUNDTYPE:
1010  case MULTICURVETYPE:
1011  case MULTISURFACETYPE:
1012  case POLYHEDRALSURFACETYPE:
1013  case TINTYPE:
1014  return LW_TRUE;
1015  break;
1016 
1017  default:
1018  return LW_FALSE;
1019  }
1020 }
#define MULTICURVETYPE
Definition: liblwgeom.h:80
#define CURVEPOLYTYPE
Definition: liblwgeom.h:79
#define COMPOUNDTYPE
Definition: liblwgeom.h:78
#define MULTIPOINTTYPE
Definition: liblwgeom.h:73
#define POLYHEDRALSURFACETYPE
Definition: liblwgeom.h:82
#define LW_FALSE
Definition: liblwgeom.h:62
#define LW_TRUE
Return types for functions with status returns.
Definition: liblwgeom.h:61
#define TINTYPE
Definition: liblwgeom.h:84
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:75
#define MULTISURFACETYPE
Definition: liblwgeom.h:81
type
Definition: ovdump.py:41
#define MULTILINETYPE
Definition: liblwgeom.h:74
#define COLLECTIONTYPE
Definition: liblwgeom.h:76
Here is the caller graph for this function: