Internal function declarations.
Generic handling for TWKB geometries.
The front of every TWKB geometry (including those embedded in collections) is a type byte and metadata byte, then optional size, bbox, etc. Read those, then switch to particular type handling code.
Definition at line 562 of file lwin_twkb.c.
584 has_bbox =
s->has_bbox;
585 memset(&bbox, 0,
sizeof(
GBOX));
GBOX * gbox_clone(const GBOX *gbox)
uint8_t gflags(int hasz, int hasm, int geodetic)
Construct a new flags char.
LWGEOM * lwline_as_lwgeom(const LWLINE *obj)
LWGEOM * lwcollection_as_lwgeom(const LWCOLLECTION *obj)
LWGEOM * lwpoly_as_lwgeom(const LWPOLY *obj)
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
LWGEOM * lwpoint_as_lwgeom(const LWPOINT *obj)
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
static LWCOLLECTION * lwmultipoly_from_twkb_state(twkb_parse_state *s)
MULTIPOLYGON.
#define TWKB_IN_MAXCOORDS
static double twkb_parse_state_double(twkb_parse_state *s, double factor)
static void header_from_twkb_state(twkb_parse_state *s)
static LWPOLY * lwpoly_from_twkb_state(twkb_parse_state *s)
POLYGON.
static LWCOLLECTION * lwmultiline_from_twkb_state(twkb_parse_state *s)
MULTILINESTRING.
static LWCOLLECTION * lwmultipoint_from_twkb_state(twkb_parse_state *s)
MULTIPOINT.
static LWCOLLECTION * lwcollection_from_twkb_state(twkb_parse_state *s)
COLLECTION, MULTIPOINTTYPE, MULTILINETYPE, MULTIPOLYGONTYPE.
static LWPOINT * lwpoint_from_twkb_state(twkb_parse_state *s)
POINT.
static LWLINE * lwline_from_twkb_state(twkb_parse_state *s)
LINESTRING.
References LWGEOM::bbox, COLLECTIONTYPE, GBOX::flags, gbox_clone(), gflags(), header_from_twkb_state(), LINETYPE, LW_FALSE, lwcollection_as_lwgeom(), lwcollection_from_twkb_state(), lwerror(), lwline_as_lwgeom(), lwline_from_twkb_state(), lwmultiline_from_twkb_state(), lwmultipoint_from_twkb_state(), lwmultipoly_from_twkb_state(), lwpoint_as_lwgeom(), lwpoint_from_twkb_state(), lwpoly_as_lwgeom(), lwpoly_from_twkb_state(), lwtype_name(), GBOX::mmax, GBOX::mmin, MULTILINETYPE, MULTIPOINTTYPE, MULTIPOLYGONTYPE, POINTTYPE, POLYGONTYPE, s, TWKB_IN_MAXCOORDS, twkb_parse_state_double(), GBOX::xmax, GBOX::xmin, GBOX::ymax, GBOX::ymin, GBOX::zmax, and GBOX::zmin.
Referenced by lwcollection_from_twkb_state(), and lwgeom_from_twkb().