PostGIS  2.2.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 1026 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().

1027 {
1028  switch (type)
1029  {
1030  case POINTTYPE:
1031  return MULTIPOINTTYPE;
1032  case LINETYPE:
1033  return MULTILINETYPE;
1034  case POLYGONTYPE:
1035  return MULTIPOLYGONTYPE;
1036  case CIRCSTRINGTYPE:
1037  return MULTICURVETYPE;
1038  case COMPOUNDTYPE:
1039  return MULTICURVETYPE;
1040  case CURVEPOLYTYPE:
1041  return MULTISURFACETYPE;
1042  case TRIANGLETYPE:
1043  return TINTYPE;
1044  default:
1045  return COLLECTIONTYPE;
1046  }
1047 }
#define LINETYPE
Definition: liblwgeom.h:71
#define MULTICURVETYPE
Definition: liblwgeom.h:80
#define POLYGONTYPE
Definition: liblwgeom.h:72
#define CURVEPOLYTYPE
Definition: liblwgeom.h:79
#define COMPOUNDTYPE
Definition: liblwgeom.h:78
#define MULTIPOINTTYPE
Definition: liblwgeom.h:73
#define TRIANGLETYPE
Definition: liblwgeom.h:83
#define TINTYPE
Definition: liblwgeom.h:84
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:75
#define MULTISURFACETYPE
Definition: liblwgeom.h:81
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition: liblwgeom.h:70
type
Definition: ovdump.py:41
#define CIRCSTRINGTYPE
Definition: liblwgeom.h:77
#define MULTILINETYPE
Definition: liblwgeom.h:74
#define COLLECTIONTYPE
Definition: liblwgeom.h:76
Here is the caller graph for this function: