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 136 of file lwin_wkb.c.
References CIRCSTRINGTYPE, COLLECTIONTYPE, COMPOUNDTYPE, CURVEPOLYTYPE, wkb_parse_state::has_m, wkb_parse_state::has_srid, wkb_parse_state::has_z, LINETYPE, LW_FALSE, LW_TRUE, LWDEBUG, LWDEBUGF, lwerror(), wkb_parse_state::lwtype, lwtype_name(), MULTICURVETYPE, MULTILINETYPE, MULTIPOINTTYPE, MULTIPOLYGONTYPE, MULTISURFACETYPE, POINTTYPE, POLYGONTYPE, POLYHEDRALSURFACETYPE, 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().
140 LWDEBUG(4,
"Entered function");
147 if( wkb_type & 0xF0000000 )
156 wkb_type = wkb_type & 0x0FFFFFFF;
158 wkb_simple_type = wkb_type % 1000;
161 if( wkb_type >= 3000 && wkb_type < 4000 )
166 else if ( wkb_type >= 2000 && wkb_type < 3000 )
170 else if ( wkb_type >= 1000 && wkb_type < 2000 )
175 switch (wkb_simple_type)
235 lwerror(
"Unknown WKB type (%d)! Full WKB type number was (%d).", wkb_simple_type, wkb_type);
#define WKB_COMPOUNDCURVE_TYPE
#define WKB_POLYHEDRALSURFACE_TYPE
#define WKB_TRIANGLE_TYPE
#define WKB_MULTISURFACE_TYPE
#define LWDEBUG(level, msg)
#define POLYHEDRALSURFACETYPE
#define WKB_MULTICURVE_TYPE
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
#define WKBZOFFSET
Flags applied in EWKB to indicate Z/M dimensions and presence/absence of SRID and bounding boxes...
#define LW_TRUE
Return types for functions with status returns.
#define WKB_POINT_TYPE
Well-Known Binary (WKB) Geometry Types.
#define WKB_LINESTRING_TYPE
#define WKB_CIRCULARSTRING_TYPE
#define WKB_MULTIPOLYGON_TYPE
#define WKB_CURVEPOLYGON_TYPE
#define WKB_MULTILINESTRING_TYPE
#define WKB_MULTIPOINT_TYPE
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
#define LWDEBUGF(level, msg,...)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
#define WKB_GEOMETRYCOLLECTION_TYPE