PostGIS  2.2.7dev-r@@SVN_REVISION@@
static uint32_t lwtype_from_twkb_type ( uint8_t  twkb_type)
static

Definition at line 116 of file lwin_twkb.c.

References COLLECTIONTYPE, LINETYPE, lwerror(), MULTILINETYPE, MULTIPOINTTYPE, MULTIPOLYGONTYPE, POINTTYPE, and POLYGONTYPE.

Referenced by header_from_twkb_state().

117 {
118  switch (twkb_type)
119  {
120  case 1:
121  return POINTTYPE;
122  case 2:
123  return LINETYPE;
124  case 3:
125  return POLYGONTYPE;
126  case 4:
127  return MULTIPOINTTYPE;
128  case 5:
129  return MULTILINETYPE;
130  case 6:
131  return MULTIPOLYGONTYPE;
132  case 7:
133  return COLLECTIONTYPE;
134 
135  default: /* Error! */
136  lwerror("Unknown WKB type");
137  return 0;
138  }
139  return 0;
140 }
#define LINETYPE
Definition: liblwgeom.h:71
#define POLYGONTYPE
Definition: liblwgeom.h:72
#define MULTIPOINTTYPE
Definition: liblwgeom.h:73
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:75
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition: liblwgeom.h:70
#define MULTILINETYPE
Definition: liblwgeom.h:74
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:74
#define COLLECTIONTYPE
Definition: liblwgeom.h:76

Here is the call graph for this function:

Here is the caller graph for this function: