PostGIS  2.1.10dev-r@@SVN_REVISION@@
int lwtype_get_collectiontype ( uint8_t  type)

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

Definition at line 982 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(), and LWGEOM_collect_garray().

983 {
984  switch (type)
985  {
986  case POINTTYPE:
987  return MULTIPOINTTYPE;
988  case LINETYPE:
989  return MULTILINETYPE;
990  case POLYGONTYPE:
991  return MULTIPOLYGONTYPE;
992  case CIRCSTRINGTYPE:
993  return MULTICURVETYPE;
994  case COMPOUNDTYPE:
995  return MULTICURVETYPE;
996  case CURVEPOLYTYPE:
997  return MULTISURFACETYPE;
998  case TRIANGLETYPE:
999  return TINTYPE;
1000  default:
1001  return COLLECTIONTYPE;
1002  }
1003 }
#define LINETYPE
Definition: liblwgeom.h:61
#define MULTICURVETYPE
Definition: liblwgeom.h:70
#define POLYGONTYPE
Definition: liblwgeom.h:62
#define CURVEPOLYTYPE
Definition: liblwgeom.h:69
#define COMPOUNDTYPE
Definition: liblwgeom.h:68
#define MULTIPOINTTYPE
Definition: liblwgeom.h:63
#define TRIANGLETYPE
Definition: liblwgeom.h:73
#define TINTYPE
Definition: liblwgeom.h:74
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:65
#define MULTISURFACETYPE
Definition: liblwgeom.h:71
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition: liblwgeom.h:60
#define CIRCSTRINGTYPE
Definition: liblwgeom.h:67
#define MULTILINETYPE
Definition: liblwgeom.h:64
#define COLLECTIONTYPE
Definition: liblwgeom.h:66

Here is the caller graph for this function: