PostGIS  2.5.7dev-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.

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 COLLECTIONTYPE
Definition: liblwgeom.h:91
#define COMPOUNDTYPE
Definition: liblwgeom.h:93
#define CURVEPOLYTYPE
Definition: liblwgeom.h:94
#define MULTILINETYPE
Definition: liblwgeom.h:89
#define MULTISURFACETYPE
Definition: liblwgeom.h:96
#define LINETYPE
Definition: liblwgeom.h:86
#define MULTIPOINTTYPE
Definition: liblwgeom.h:88
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition: liblwgeom.h:85
#define TINTYPE
Definition: liblwgeom.h:99
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:90
#define POLYGONTYPE
Definition: liblwgeom.h:87
#define CIRCSTRINGTYPE
Definition: liblwgeom.h:92
#define MULTICURVETYPE
Definition: liblwgeom.h:95
#define TRIANGLETYPE
Definition: liblwgeom.h:98
type
Definition: ovdump.py:41

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

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

Here is the caller graph for this function: