382 bytea *bytea_twkb = PG_GETARG_BYTEA_P(0);
385 uint8_t *twkb = (uint8_t*)VARDATA(bytea_twkb);
392 geom = geometry_serialize(lwgeom);
394 PG_FREE_IF_COPY(bytea_twkb, 0);
395 PG_RETURN_POINTER(geom);
#define LW_PARSER_CHECK_ALL
void lwgeom_free(LWGEOM *geom)
LWGEOM * lwgeom_from_twkb(const uint8_t *twkb, size_t twkb_size, char check)
WKB inputs must have a declared size, to prevent malformed WKB from reading off the end of the memory...
int lwgeom_needs_bbox(const LWGEOM *geom)
Check whether or not a lwgeom is big enough to warrant a bounding box.
void lwgeom_add_bbox(LWGEOM *lwgeom)
Compute a bbox if not already computed.