PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ lwtype_from_twkb_type()

static uint32_t lwtype_from_twkb_type ( uint8_t  twkb_type)
static

Definition at line 130 of file lwin_twkb.c.

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

Referenced by header_from_twkb_state().

131 {
132  switch (twkb_type)
133  {
134  case 1:
135  return POINTTYPE;
136  case 2:
137  return LINETYPE;
138  case 3:
139  return POLYGONTYPE;
140  case 4:
141  return MULTIPOINTTYPE;
142  case 5:
143  return MULTILINETYPE;
144  case 6:
145  return MULTIPOLYGONTYPE;
146  case 7:
147  return COLLECTIONTYPE;
148 
149  default: /* Error! */
150  lwerror("Unknown WKB type");
151  return 0;
152  }
153  return 0;
154 }
#define LINETYPE
Definition: liblwgeom.h:86
#define POLYGONTYPE
Definition: liblwgeom.h:87
#define MULTIPOINTTYPE
Definition: liblwgeom.h:88
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:90
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition: liblwgeom.h:85
#define MULTILINETYPE
Definition: liblwgeom.h:89
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:190
#define COLLECTIONTYPE
Definition: liblwgeom.h:91
Here is the call graph for this function:
Here is the caller graph for this function: