377{
378 bytea *bytea_wkb = PG_GETARG_BYTEA_P(0);
381 uint8_t *wkb = (uint8_t*)VARDATA(bytea_wkb);
382
384 if (!lwgeom)
385 lwpgerror("Unable to parse WKB");
386
387 if ((PG_NARGS() > 1) && (!PG_ARGISNULL(1)))
388 {
389 int32 srid = PG_GETARG_INT32(1);
391 }
392
395
398 PG_FREE_IF_COPY(bytea_wkb, 0);
399 PG_RETURN_POINTER(geom);
400}
#define LW_PARSER_CHECK_ALL
void lwgeom_set_srid(LWGEOM *geom, int32_t srid)
Set the SRID on an LWGEOM For collections, only the parent gets an SRID, all the children get SRID_UN...
void lwgeom_free(LWGEOM *geom)
int lwgeom_needs_bbox(const LWGEOM *geom)
Check whether or not a lwgeom is big enough to warrant a bounding box.
LWGEOM * lwgeom_from_wkb(const uint8_t *wkb, const size_t wkb_size, const char check)
WKB inputs must have a declared size, to prevent malformed WKB from reading off the end of the memory...
void lwgeom_add_bbox(LWGEOM *lwgeom)
Compute a bbox if not already computed.
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)