PostGIS  2.3.8dev-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 1039 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().

1040 {
1041  switch (type)
1042  {
1043  case POINTTYPE:
1044  return MULTIPOINTTYPE;
1045  case LINETYPE:
1046  return MULTILINETYPE;
1047  case POLYGONTYPE:
1048  return MULTIPOLYGONTYPE;
1049  case CIRCSTRINGTYPE:
1050  return MULTICURVETYPE;
1051  case COMPOUNDTYPE:
1052  return MULTICURVETYPE;
1053  case CURVEPOLYTYPE:
1054  return MULTISURFACETYPE;
1055  case TRIANGLETYPE:
1056  return TINTYPE;
1057  default:
1058  return COLLECTIONTYPE;
1059  }
1060 }
#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: