522 char *wkb_bytea = (
char*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0));
524 size_t wkb_size = VARSIZE(wkb_bytea);
525 uint8_t *wkb = (uint8_t*)VARDATA(wkb_bytea);
529 lwpgerror(
"Unable to parse WKB");
532 srid_check_latlong(fcinfo, lwgeom->
srid);
536 PG_RETURN_POINTER(gser);
GSERIALIZED * gserialized_geography_from_lwgeom(LWGEOM *lwgeom, int32 geog_typmod)
void lwgeom_free(LWGEOM *geom)
#define LW_PARSER_CHECK_NONE
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...