diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-01-22 14:09:35 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-22 14:09:35 +0100 |
| commit | a95431d8666db9953115a3a824db396f8aa82b52 (patch) | |
| tree | 21117e52f95b8f36880efef8cd71c1fcec21242c /src/iso19111/coordinatesystem.cpp | |
| parent | c5fb54168665d41503ef3a08f0534da58949b632 (diff) | |
| parent | 4724025e6c817761052fc0dc8810fd489a9e0104 (diff) | |
| download | PROJ-a95431d8666db9953115a3a824db396f8aa82b52.tar.gz PROJ-a95431d8666db9953115a3a824db396f8aa82b52.zip | |
Merge pull request #1855 from rouault/rfc4_merge_back_master
[RFC4_dev] Merge master back to rfc4 latest branch
Diffstat (limited to 'src/iso19111/coordinatesystem.cpp')
| -rw-r--r-- | src/iso19111/coordinatesystem.cpp | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/src/iso19111/coordinatesystem.cpp b/src/iso19111/coordinatesystem.cpp index 6769b486..fc4b7492 100644 --- a/src/iso19111/coordinatesystem.cpp +++ b/src/iso19111/coordinatesystem.cpp @@ -429,8 +429,8 @@ void CoordinateSystemAxis::_exportToJSON( //! @cond Doxygen_Suppress bool CoordinateSystemAxis::_isEquivalentTo( - const util::IComparable *other, - util::IComparable::Criterion criterion) const { + const util::IComparable *other, util::IComparable::Criterion criterion, + const io::DatabaseContextPtr &dbContext) const { auto otherCSA = dynamic_cast<const CoordinateSystemAxis *>(other); if (otherCSA == nullptr) { return false; @@ -441,7 +441,7 @@ bool CoordinateSystemAxis::_isEquivalentTo( return false; } if (criterion == util::IComparable::Criterion::STRICT) { - if (!IdentifiedObject::_isEquivalentTo(other, criterion)) { + if (!IdentifiedObject::_isEquivalentTo(other, criterion, dbContext)) { return false; } if (abbreviation() != otherCSA->abbreviation()) { @@ -581,11 +581,13 @@ void CoordinateSystem::_exportToJSON( writer.Add(getWKT2Type(true)); writer.AddObjKey("axis"); - auto axisContext(writer.MakeArrayContext(false)); - const auto &l_axisList = axisList(); - for (auto &axis : l_axisList) { - formatter->setOmitTypeInImmediateChild(); - axis->_exportToJSON(formatter); + { + auto axisContext(writer.MakeArrayContext(false)); + const auto &l_axisList = axisList(); + for (auto &axis : l_axisList) { + formatter->setOmitTypeInImmediateChild(); + axis->_exportToJSON(formatter); + } } if (formatter->outputId()) { @@ -599,11 +601,11 @@ void CoordinateSystem::_exportToJSON( //! @cond Doxygen_Suppress bool CoordinateSystem::_isEquivalentTo( - const util::IComparable *other, - util::IComparable::Criterion criterion) const { + const util::IComparable *other, util::IComparable::Criterion criterion, + const io::DatabaseContextPtr &dbContext) const { auto otherCS = dynamic_cast<const CoordinateSystem *>(other); if (otherCS == nullptr || - !IdentifiedObject::_isEquivalentTo(other, criterion)) { + !IdentifiedObject::_isEquivalentTo(other, criterion, dbContext)) { return false; } const auto &list = axisList(); @@ -615,7 +617,8 @@ bool CoordinateSystem::_isEquivalentTo( return false; } for (size_t i = 0; i < list.size(); i++) { - if (!list[i]->_isEquivalentTo(otherList[i].get(), criterion)) { + if (!list[i]->_isEquivalentTo(otherList[i].get(), criterion, + dbContext)) { return false; } } |
