From 238f48fb7cd006296cbd622ab9e4187139af9a8e Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Fri, 27 Mar 2020 17:23:10 +0100 Subject: Fix identification of projected CRS whose name is close but not strictly equal to a ESRI alias (fixes #2099) --- src/iso19111/crs.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/iso19111/crs.cpp b/src/iso19111/crs.cpp index cff93508..b0f5bcf9 100644 --- a/src/iso19111/crs.cpp +++ b/src/iso19111/crs.cpp @@ -3741,7 +3741,8 @@ ProjectedCRS::identify(const io::AuthorityFactoryPtr &authorityFactory) const { return res; } res.emplace_back(crsNN, eqName ? 90 : 70); - } else if (eqName && CRS::getPrivate()->implicitCS_ && + } else if (objects.size() == 1 && + CRS::getPrivate()->implicitCS_ && coordinateSystem() ->axisList()[0] ->unit() @@ -3759,11 +3760,11 @@ ProjectedCRS::identify(const io::AuthorityFactoryPtr &authorityFactory) const { derivingConversionRef()->_isEquivalentTo( crs->derivingConversionRef().get(), util::IComparable::Criterion::EQUIVALENT, - dbContext) && - objects.size() == 1) { + dbContext)) { res.clear(); - res.emplace_back(crsNN, - crs->nameStr() == thisName ? 100 : 90); + res.emplace_back(crsNN, crs->nameStr() == thisName + ? 100 + : eqName ? 90 : 70); return res; } else { res.emplace_back(crsNN, 25); -- cgit v1.2.3