1665{
1666 GSERIALIZED *pg_lwgeom = PG_GETARG_GSERIALIZED_P(0);
1669 int result;
1670 BOX *out = NULL;
1671
1672
1674
1675
1677
1678
1680 PG_FREE_IF_COPY(pg_lwgeom, 0);
1681
1682
1683 if (!result)
1684 PG_RETURN_NULL();
1685
1687 out->low.x = gbox.
xmin;
1688 out->low.y = gbox.
ymin;
1689 out->high.x = gbox.
xmax;
1690 out->high.y = gbox.
ymax;
1691 PG_RETURN_POINTER(out);
1692}
void gbox_init(GBOX *gbox)
Zero out all the entries in the GBOX.
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void * lwalloc(size_t size)
int lwgeom_calculate_gbox(const LWGEOM *lwgeom, GBOX *gbox)
Calculate bounding box of a geometry, automatically taking into account whether it is cartesian or ge...