990{
991 double maxdist;
994 double tolerance = PG_GETARG_FLOAT8(2);
997
998 if (tolerance < 0)
999 {
1000 elog(ERROR, "Tolerance cannot be less than zero\n");
1001 PG_RETURN_NULL();
1002 }
1003
1006
1007 PG_FREE_IF_COPY(geom1, 0);
1008 PG_FREE_IF_COPY(geom2, 1);
1009
1010
1011 if (maxdist > -1)
1012 PG_RETURN_BOOL(tolerance >= maxdist);
1013
1015}
void gserialized_error_if_srid_mismatch(const GSERIALIZED *g1, const GSERIALIZED *g2, const char *funcname)
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
double lwgeom_maxdistance3d_tolerance(const LWGEOM *lw1, const LWGEOM *lw2, double tolerance)
Function handling 3d max distance calculations and dfullywithin calculations.