Take in an unknown kind of wkb type number and ensure it comes out as an extended WKB type number (with Z/M/SRID flags masked onto the high bits).
Definition at line 144 of file lwin_wkb.c.
148 LWDEBUG(4,
"Entered function");
155 if( wkb_type & 0xF0000000 )
160 LWDEBUGF(4,
"Extended type: has_z=%d has_m=%d has_srid=%d",
s->has_z,
s->has_m,
s->has_srid);
164 wkb_type = wkb_type & 0x0FFFFFFF;
166 wkb_simple_type = wkb_type % 1000;
169 if( wkb_type >= 3000 && wkb_type < 4000 )
174 else if ( wkb_type >= 2000 && wkb_type < 3000 )
178 else if ( wkb_type >= 1000 && wkb_type < 2000 )
183 switch (wkb_simple_type)
243 lwerror(
"Unknown WKB type (%d)! Full WKB type number was (%d).", wkb_simple_type, wkb_type);
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
#define POLYHEDRALSURFACETYPE
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
#define LW_TRUE
Return types for functions with status returns.
#define WKBZOFFSET
Flags applied in EWKB to indicate Z/M dimensions and presence/absence of SRID and bounding boxes.
#define WKB_COMPOUNDCURVE_TYPE
#define WKB_POLYHEDRALSURFACE_TYPE
#define WKB_GEOMETRYCOLLECTION_TYPE
#define WKB_TRIANGLE_TYPE
#define WKB_MULTIPOLYGON_TYPE
#define WKB_MULTIPOINT_TYPE
#define WKB_MULTISURFACE_TYPE
#define WKB_CURVEPOLYGON_TYPE
#define WKB_POINT_TYPE
Well-Known Binary (WKB) Geometry Types.
#define WKB_MULTICURVE_TYPE
#define WKB_MULTILINESTRING_TYPE
#define WKB_LINESTRING_TYPE
#define WKB_CIRCULARSTRING_TYPE
#define LWDEBUG(level, msg)
#define LWDEBUGF(level, msg,...)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
References CIRCSTRINGTYPE, COLLECTIONTYPE, COMPOUNDTYPE, CURVEPOLYTYPE, LINETYPE, LW_FALSE, LW_TRUE, LWDEBUG, LWDEBUGF, lwerror(), lwtype_name(), MULTICURVETYPE, MULTILINETYPE, MULTIPOINTTYPE, MULTIPOLYGONTYPE, MULTISURFACETYPE, POINTTYPE, POLYGONTYPE, POLYHEDRALSURFACETYPE, s, TINTYPE, TRIANGLETYPE, WKB_CIRCULARSTRING_TYPE, WKB_COMPOUNDCURVE_TYPE, WKB_CURVE_TYPE, WKB_CURVEPOLYGON_TYPE, WKB_GEOMETRYCOLLECTION_TYPE, WKB_LINESTRING_TYPE, WKB_MULTICURVE_TYPE, WKB_MULTILINESTRING_TYPE, WKB_MULTIPOINT_TYPE, WKB_MULTIPOLYGON_TYPE, WKB_MULTISURFACE_TYPE, WKB_POINT_TYPE, WKB_POLYGON_TYPE, WKB_POLYHEDRALSURFACE_TYPE, WKB_SURFACE_TYPE, WKB_TIN_TYPE, WKB_TRIANGLE_TYPE, WKBMOFFSET, WKBSRIDFLAG, and WKBZOFFSET.
Referenced by lwgeom_from_wkb_state().