PostGIS  2.5.0rc1dev-r@@SVN_REVISION@@

◆ lwtype_get_collectiontype()

uint32_t lwtype_get_collectiontype ( uint8_t  type)

Given an lwtype number, what homogeneous collection can hold it?

Definition at line 1120 of file lwgeom.c.

References CIRCSTRINGTYPE, COLLECTIONTYPE, COMPOUNDTYPE, CURVEPOLYTYPE, LINETYPE, MULTICURVETYPE, MULTILINETYPE, MULTIPOINTTYPE, MULTIPOLYGONTYPE, MULTISURFACETYPE, POINTTYPE, POLYGONTYPE, TINTYPE, and TRIANGLETYPE.

Referenced by circ_node_internal_new(), lwcollection_build_buffer(), LWGEOM_collect(), LWGEOM_collect_garray(), and TWKBFromLWGEOMArray().

1121 {
1122  switch (type)
1123  {
1124  case POINTTYPE:
1125  return MULTIPOINTTYPE;
1126  case LINETYPE:
1127  return MULTILINETYPE;
1128  case POLYGONTYPE:
1129  return MULTIPOLYGONTYPE;
1130  case CIRCSTRINGTYPE:
1131  return MULTICURVETYPE;
1132  case COMPOUNDTYPE:
1133  return MULTICURVETYPE;
1134  case CURVEPOLYTYPE:
1135  return MULTISURFACETYPE;
1136  case TRIANGLETYPE:
1137  return TINTYPE;
1138  default:
1139  return COLLECTIONTYPE;
1140  }
1141 }
#define LINETYPE
Definition: liblwgeom.h:85
#define MULTICURVETYPE
Definition: liblwgeom.h:94
#define POLYGONTYPE
Definition: liblwgeom.h:86
#define CURVEPOLYTYPE
Definition: liblwgeom.h:93
#define COMPOUNDTYPE
Definition: liblwgeom.h:92
#define MULTIPOINTTYPE
Definition: liblwgeom.h:87
#define TRIANGLETYPE
Definition: liblwgeom.h:97
#define TINTYPE
Definition: liblwgeom.h:98
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:89
#define MULTISURFACETYPE
Definition: liblwgeom.h:95
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition: liblwgeom.h:84
type
Definition: ovdump.py:41
#define CIRCSTRINGTYPE
Definition: liblwgeom.h:91
#define MULTILINETYPE
Definition: liblwgeom.h:88
#define COLLECTIONTYPE
Definition: liblwgeom.h:90
Here is the caller graph for this function: