1298 LWGEOM *lwgeom1, *lwresult ;
1302 geom1 = PG_GETARG_GSERIALIZED_P(0);
1310 PG_RETURN_POINTER(geom1);
1314 bbox2 = (
GBOX *)PG_GETARG_POINTER(1);
1322 PG_FREE_IF_COPY(geom1, 0);
1325 PG_RETURN_POINTER(result);
1332 PG_RETURN_POINTER(geom1);
1339 PG_FREE_IF_COPY(geom1, 0);
1341 if (!lwresult) PG_RETURN_NULL();
1345 PG_RETURN_POINTER(result);
int gbox_overlaps_2d(const GBOX *g1, const GBOX *g2)
Return LW_TRUE if the GBOX overlaps on the 2d plane, LW_FALSE otherwise.
int gbox_contains_2d(const GBOX *g1, const GBOX *g2)
Return LW_TRUE if the first GBOX contains the second on the 2d plane, LW_FALSE otherwise.
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
const GBOX * lwgeom_get_bbox(const LWGEOM *lwgeom)
Get a non-empty geometry bounding box, computing and caching it if not already there.
LWGEOM * lwgeom_clip_by_rect(const LWGEOM *geom1, double x0, double y0, double x1, double y1)
LWGEOM * lwgeom_construct_empty(uint8_t type, int srid, char hasz, char hasm)
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)