aboutsummaryrefslogtreecommitdiff
path: root/src/iso19111/coordinatesystem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/iso19111/coordinatesystem.cpp')
-rw-r--r--src/iso19111/coordinatesystem.cpp27
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;
}
}