PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ lwtype_get_collectiontype()

int lwtype_get_collectiontype ( uint8_t  type)

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

Definition at line 1075 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().

1076 {
1077  switch (type)
1078  {
1079  case POINTTYPE:
1080  return MULTIPOINTTYPE;
1081  case LINETYPE:
1082  return MULTILINETYPE;
1083  case POLYGONTYPE:
1084  return MULTIPOLYGONTYPE;
1085  case CIRCSTRINGTYPE:
1086  return MULTICURVETYPE;
1087  case COMPOUNDTYPE:
1088  return MULTICURVETYPE;
1089  case CURVEPOLYTYPE:
1090  return MULTISURFACETYPE;
1091  case TRIANGLETYPE:
1092  return TINTYPE;
1093  default:
1094  return COLLECTIONTYPE;
1095  }
1096 }
#define LINETYPE
Definition: liblwgeom.h:86
#define MULTICURVETYPE
Definition: liblwgeom.h:95
#define POLYGONTYPE
Definition: liblwgeom.h:87
#define CURVEPOLYTYPE
Definition: liblwgeom.h:94
#define COMPOUNDTYPE
Definition: liblwgeom.h:93
#define MULTIPOINTTYPE
Definition: liblwgeom.h:88
#define TRIANGLETYPE
Definition: liblwgeom.h:98
#define TINTYPE
Definition: liblwgeom.h:99
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:90
#define MULTISURFACETYPE
Definition: liblwgeom.h:96
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition: liblwgeom.h:85
type
Definition: ovdump.py:41
#define CIRCSTRINGTYPE
Definition: liblwgeom.h:92
#define MULTILINETYPE
Definition: liblwgeom.h:89
#define COLLECTIONTYPE
Definition: liblwgeom.h:91
Here is the caller graph for this function: