aboutsummaryrefslogtreecommitdiff
path: root/src/common.cpp
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2018-12-13 17:49:11 +0100
committerEven Rouault <even.rouault@spatialys.com>2018-12-13 18:13:29 +0100
commit17b8566f303e0585d7cd775afd5d39da8058fdc3 (patch)
treee55e002b2c711b5f62214ec42852a81c3deb170d /src/common.cpp
parent8a2938026575305298624bce924fee1b5a361576 (diff)
downloadPROJ-17b8566f303e0585d7cd775afd5d39da8058fdc3.tar.gz
PROJ-17b8566f303e0585d7cd775afd5d39da8058fdc3.zip
Prime meridian equivalence: increase tolerance
Diffstat (limited to 'src/common.cpp')
-rw-r--r--src/common.cpp6
1 files changed, 4 insertions, 2 deletions
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());
}
// ---------------------------------------------------------------------------