2597 GSERIALIZED *pg_geom1 = PG_GETARG_GSERIALIZED_P(0);
2598 GSERIALIZED *pg_geom2 = PG_GETARG_GSERIALIZED_P(1);
2599 double dist = PG_GETARG_FLOAT8(2);
2608 elog(ERROR,
"optimistic_overlap: first arg isn't a polygon\n");
2614 elog(ERROR,
"optimistic_overlap: 2nd arg isn't a [multi-]polygon\n");
2621 g1_bvol.
xmin = g1_bvol.
xmin - dist;
2622 g1_bvol.
ymin = g1_bvol.
ymin - dist;
2623 g1_bvol.
xmax = g1_bvol.
xmax + dist;
2624 g1_bvol.
ymax = g1_bvol.
ymax + dist;
2629 PG_RETURN_BOOL(
false);
2637 DatumGetFloat8(DirectFunctionCall2(
ST_Distance, PointerGetDatum(pg_geom1), PointerGetDatum(pg_geom2)));
2639 PG_RETURN_BOOL(calc_dist < dist);
void gserialized_error_if_srid_mismatch(const GSERIALIZED *g1, const GSERIALIZED *g2, const char *funcname)
int gserialized_get_gbox_p(const GSERIALIZED *g, GBOX *gbox)
Read the box from the GSERIALIZED or calculate it if necessary.
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
Datum ST_Distance(PG_FUNCTION_ARGS)