PostGIS  2.5.0dev-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 1119 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().

1120 {
1121  switch (type)
1122  {
1123  case POINTTYPE:
1124  return MULTIPOINTTYPE;
1125  case LINETYPE:
1126  return MULTILINETYPE;
1127  case POLYGONTYPE:
1128  return MULTIPOLYGONTYPE;
1129  case CIRCSTRINGTYPE:
1130  return MULTICURVETYPE;
1131  case COMPOUNDTYPE:
1132  return MULTICURVETYPE;
1133  case CURVEPOLYTYPE:
1134  return MULTISURFACETYPE;
1135  case TRIANGLETYPE:
1136  return TINTYPE;
1137  default:
1138  return COLLECTIONTYPE;
1139  }
1140 }
#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: