1591 static const uint32_t geom_idx = 0;
1592 static const uint32_t box2d_idx = 1;
1594 LWGEOM *lwgeom1, *lwresult ;
1604 PG_RETURN_DATUM(PG_GETARG_DATUM(geom_idx));
1608 bbox2 = (
GBOX *)PG_GETARG_POINTER(box2d_idx);
1614 PG_RETURN_DATUM(PG_GETARG_DATUM(geom_idx));
1622 result = geometry_serialize(lwresult) ;
1624 PG_RETURN_POINTER(
result);
1636 result = geometry_serialize(lwresult) ;
1637 PG_RETURN_POINTER(
result);
char result[OUT_DOUBLE_BUFFER_SIZE]
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.
int gserialized_datum_get_internals_p(Datum gsdatum, GBOX *gbox, lwflags_t *flags, uint8_t *type, int32_t *srid)
Peak into a GSERIALIZED datum to find its bounding box and some other metadata.
void lwgeom_free(LWGEOM *geom)
LWGEOM * lwgeom_clip_by_rect(const LWGEOM *geom1, double x0, double y0, double x1, double y1)
LWGEOM * lwgeom_construct_empty(uint8_t type, int32_t srid, char hasz, char hasm)