From 17b8566f303e0585d7cd775afd5d39da8058fdc3 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Thu, 13 Dec 2018 17:49:11 +0100 Subject: Prime meridian equivalence: increase tolerance --- src/common.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/common.cpp') diff --git a/src/common.cpp b/src/common.cpp index 2a9d17c7..bd690924 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -370,15 +370,17 @@ bool Measure::operator==(const Measure &other) PROJ_CONST_DEFN { /** \brief Returns whether an object is equivalent to another one. * @param other other object to compare to * @param criterion comparaison criterion. + * @param maxRelativeError Maximum relative error allowed. * @return true if objects are equivalent. */ bool Measure::_isEquivalentTo(const Measure &other, - util::IComparable::Criterion criterion) const { + util::IComparable::Criterion criterion, + double maxRelativeError) const { if (criterion == util::IComparable::Criterion::STRICT) { return operator==(other); } return std::fabs(getSIValue() - other.getSIValue()) <= - 1e-10 * std::fabs(getSIValue()); + maxRelativeError * std::fabs(getSIValue()); } // --------------------------------------------------------------------------- -- cgit v1.2.3