TRIANGLE Read a WKB triangle, starting just after the endian byte, type number and optional srid number.
Advance the parse state forward appropriately. Triangles are encoded like polygons in WKB, but more like linestrings as lwgeometries.
Definition at line 564 of file lwin_wkb.c.
576 lwerror(
"Triangle has wrong number of rings: %d", nrings);
#define LW_PARSER_CHECK_ZCLOSURE
int ptarray_is_closed_z(const POINTARRAY *pa)
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
#define LW_PARSER_CHECK_MINPOINTS
Parser check flags.
void ptarray_free(POINTARRAY *pa)
LWTRIANGLE * lwtriangle_construct_empty(int srid, char hasz, char hasm)
#define LWDEBUGF(level, msg,...)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
static uint32_t integer_from_wkb_state(wkb_parse_state *s)
Int32 Read 4-byte integer and advance the parse state forward.
static POINTARRAY * ptarray_from_wkb_state(wkb_parse_state *s)
POINTARRAY Read a dynamically sized point array and advance the parse state forward.
References integer_from_wkb_state(), LW_PARSER_CHECK_MINPOINTS, LW_PARSER_CHECK_ZCLOSURE, LWDEBUGF, lwerror(), lwtriangle_construct_empty(), lwtype_name(), POINTARRAY::npoints, LWTRIANGLE::points, ptarray_free(), ptarray_from_wkb_state(), ptarray_is_closed_z(), and s.
Referenced by lwgeom_from_wkb_state().