Definition at line 1660 of file lwgeom_functions_basic.c.
References gbox_init(), lwalloc(), lwfree(), lwgeom_calculate_gbox(), LWGEOM_envelope(), lwgeom_from_gserialized(), PG_FUNCTION_INFO_V1(), GBOX::xmax, GBOX::xmin, GBOX::ymax, and GBOX::ymin.
Referenced by LWGEOM_expand().
1662 GSERIALIZED *pg_lwgeom = PG_GETARG_GSERIALIZED_P(0);
1676 PG_FREE_IF_COPY(pg_lwgeom, 0);
1683 out->low.x = gbox.
xmin;
1684 out->low.y = gbox.
ymin;
1685 out->high.x = gbox.
xmax;
1686 out->high.y = gbox.
ymax;
1687 PG_RETURN_POINTER(out);
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
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...
void gbox_init(GBOX *gbox)
Zero out all the entries in the GBOX.
void * lwalloc(size_t size)