933{
934 double mindist;
937 double tolerance = PG_GETARG_FLOAT8(2);
940
941 if (tolerance < 0)
942 {
943 elog(ERROR, "Tolerance cannot be less than zero\n");
944 PG_RETURN_NULL();
945 }
946
948
950
951 PG_FREE_IF_COPY(geom1, 0);
952 PG_FREE_IF_COPY(geom2, 1);
953
954
955
956 PG_RETURN_BOOL(tolerance >= mindist);
957}
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_mindistance3d_tolerance(const LWGEOM *lw1, const LWGEOM *lw2, double tolerance)
Function handling 3d min distance calculations and dwithin calculations.