Definition at line 2576 of file lwgeom_functions_basic.c.
2578 GSERIALIZED *pg_geom1 = PG_GETARG_GSERIALIZED_P(0);
2579 GSERIALIZED *pg_geom2 = PG_GETARG_GSERIALIZED_P(1);
2580 double dist = PG_GETARG_FLOAT8(2);
2591 elog(ERROR,
"optimistic_overlap: first arg isn't a polygon\n");
2597 elog(ERROR,
"optimistic_overlap: 2nd arg isn't a [multi-]polygon\n");
2604 g1_bvol.
xmin = g1_bvol.
xmin - dist;
2605 g1_bvol.
ymin = g1_bvol.
ymin - dist;
2606 g1_bvol.
xmax = g1_bvol.
xmax + dist;
2607 g1_bvol.
ymax = g1_bvol.
ymax + dist;
2614 PG_RETURN_BOOL(
false);
2621 calc_dist = DatumGetFloat8 ( DirectFunctionCall2(
LWGEOM_mindistance2d, PointerGetDatum( pg_geom1 ), PointerGetDatum( pg_geom2 )));
2623 PG_RETURN_BOOL(calc_dist < dist);
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
int gserialized_get_gbox_p(const GSERIALIZED *g, GBOX *box)
Read the bounding box off a serialization and calculate one if it is not already there.
void error_if_srid_mismatch(int srid1, int srid2)
Datum LWGEOM_mindistance2d(PG_FUNCTION_ARGS)
References LWGEOM::bbox, error_if_srid_mismatch(), gserialized_get_gbox_p(), lwgeom_from_gserialized(), LWGEOM_mindistance2d(), MULTIPOLYGONTYPE, POLYGONTYPE, LWGEOM::srid, LWGEOM::type, GBOX::xmax, GBOX::xmin, GBOX::ymax, and GBOX::ymin.