diff options
Diffstat (limited to 'src/iso19111/crs.cpp')
| -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); } |
