From a68c146d7f3c1efb0f42b46c708a0a195e51a2ff Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 16 Dec 2019 13:24:11 +0100 Subject: BoundCRS::identify(): improvements to discard CRS that aren't relevant (fixes #1801) Fix for ``` projinfo --identify "+proj=utm +zone=48 +a=6377276.345 +b=6356075.41314024 +towgs84=198,881,317,0,0,0,0 +units=m +no_defs +type=crs" ``` to only return BoundCRS of EPSG:3148: 70 % Previously it also returned EPSG:23948 and EPSG:24048 whose projected CRS-only parts where likely matches, but those 2 CRSs don't have a +towgs84=198,881,317,0,0,0,0, so discard them. --- src/iso19111/coordinateoperation.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/iso19111/coordinateoperation.cpp') diff --git a/src/iso19111/coordinateoperation.cpp b/src/iso19111/coordinateoperation.cpp index 0469cae1..2c3e38ac 100644 --- a/src/iso19111/coordinateoperation.cpp +++ b/src/iso19111/coordinateoperation.cpp @@ -10189,7 +10189,9 @@ bool ConcatenatedOperation::_isEquivalentTo( const util::IComparable *other, util::IComparable::Criterion criterion) const { auto otherCO = dynamic_cast(other); - if (otherCO == nullptr || !ObjectUsage::_isEquivalentTo(other, criterion)) { + if (otherCO == nullptr || + (criterion == util::IComparable::Criterion::STRICT && + !ObjectUsage::_isEquivalentTo(other, criterion))) { return false; } const auto &steps = operations(); -- cgit v1.2.3