diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2021-10-06 19:21:03 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2021-10-06 19:21:03 +0200 |
| commit | 3a67ea87fac5b835df7966fa801881eaf7503e78 (patch) | |
| tree | f3535b3d4ab1dc5dc5202f0901cf3115a7196fa2 /src/iso19111 | |
| parent | a92526a4ba60abc9c8909e5fa098b4102a44dc7e (diff) | |
| download | PROJ-3a67ea87fac5b835df7966fa801881eaf7503e78.tar.gz PROJ-3a67ea87fac5b835df7966fa801881eaf7503e78.zip | |
ProjectedCRS::_isEquivalentTo(): ignore base CRS axis order even in EQUIVALENT mode if one of them is lacking an explicit CS order (refs #2886)
Diffstat (limited to 'src/iso19111')
| -rw-r--r-- | src/iso19111/crs.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/iso19111/crs.cpp b/src/iso19111/crs.cpp index b48f0d70..731bf7f9 100644 --- a/src/iso19111/crs.cpp +++ b/src/iso19111/crs.cpp @@ -4171,6 +4171,17 @@ ProjectedCRS::create(const util::PropertyMap &properties, bool ProjectedCRS::_isEquivalentTo( const util::IComparable *other, util::IComparable::Criterion criterion, const io::DatabaseContextPtr &dbContext) const { + auto otherProjCRS = dynamic_cast<const ProjectedCRS *>(other); + if (otherProjCRS != nullptr && + criterion == util::IComparable::Criterion::EQUIVALENT && + (d->baseCRS_->hasImplicitCS() || + otherProjCRS->d->baseCRS_->hasImplicitCS())) { + // If one of the 2 base CRS has implicit coordinate system, then + // relax the check. The axis order of the base CRS doesn't matter + // for most purposes. + criterion = + util::IComparable::Criterion::EQUIVALENT_EXCEPT_AXIS_ORDER_GEOGCRS; + } return other != nullptr && util::isOfExactType<ProjectedCRS>(*other) && DerivedCRS::_isEquivalentTo(other, criterion, dbContext); } |
