aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2021-05-27 11:57:05 +0200
committerEven Rouault <even.rouault@spatialys.com>2021-05-27 11:57:05 +0200
commitedc6df3dc1a862ca47f0376d1e35971fc964c573 (patch)
treece3c845caafa23cdd25f7dbef6fa615c52492caf
parent548a6ab0509ea03bf4fffc377c17fcd0ba977c7d (diff)
downloadPROJ-edc6df3dc1a862ca47f0376d1e35971fc964c573.tar.gz
PROJ-edc6df3dc1a862ca47f0376d1e35971fc964c573.zip
ConcatenatedOperation::fixStepsDirection(): remove recently introdued hack specific to EPSG:9731 now that is is deprecated
-rw-r--r--src/iso19111/operation/concatenatedoperation.cpp28
-rw-r--r--test/unit/test_factory.cpp23
2 files changed, 2 insertions, 49 deletions
diff --git a/src/iso19111/operation/concatenatedoperation.cpp b/src/iso19111/operation/concatenatedoperation.cpp
index fda341dd..20bbce6f 100644
--- a/src/iso19111/operation/concatenatedoperation.cpp
+++ b/src/iso19111/operation/concatenatedoperation.cpp
@@ -245,34 +245,6 @@ void ConcatenatedOperation::fixStepsDirection(
return false;
};
- // Special case for EPSG:9731 "ETRS89 to ETRS89 + Catania 1965 height (1)"
- // which chains "ETRS89 to ETRS89 + Genoa 1942 height (1)" and
- // "Genoa 1942 height to Catania 1965 height (1)"
- if (operationsInOut.size() == 2 && isGeographic(concatOpSourceCRS.get())) {
- const auto compoundTarget =
- dynamic_cast<const crs::CompoundCRS *>(concatOpTargetCRS.get());
- const auto compoundTargetOp0 = dynamic_cast<const crs::CompoundCRS *>(
- operationsInOut[0]->targetCRS().get());
- if (compoundTarget && compoundTargetOp0 &&
- operationsInOut[0]->sourceCRS() &&
- operationsInOut[1]->sourceCRS() &&
- operationsInOut[1]->targetCRS() &&
- concatOpSourceCRS->nameStr() ==
- compoundTarget->componentReferenceSystems()[0]->nameStr() &&
- concatOpSourceCRS->nameStr() ==
- operationsInOut[0]->sourceCRS()->nameStr() &&
- concatOpSourceCRS->nameStr() ==
- compoundTargetOp0->componentReferenceSystems()[0]->nameStr() &&
- compoundTargetOp0->componentReferenceSystems()[1]->nameStr() ==
- operationsInOut[1]->sourceCRS()->nameStr() &&
- operationsInOut[1]->targetCRS()->nameStr() ==
- compoundTarget->componentReferenceSystems()[1]->nameStr()) {
- operationsInOut[1]->setCRSs(
- NN_NO_CHECK(operationsInOut[0]->targetCRS()), concatOpTargetCRS,
- nullptr);
- }
- }
-
for (size_t i = 0; i < operationsInOut.size(); ++i) {
auto &op = operationsInOut[i];
auto l_sourceCRS = op->sourceCRS();
diff --git a/test/unit/test_factory.cpp b/test/unit/test_factory.cpp
index d7bb7a07..6c8340aa 100644
--- a/test/unit/test_factory.cpp
+++ b/test/unit/test_factory.cpp
@@ -1326,26 +1326,6 @@ TEST(
// ---------------------------------------------------------------------------
-TEST(
- factory,
- AuthorityFactory_createCoordinateOperation_concatenated_operation_epsg_9731) {
- auto factory = AuthorityFactory::create(DatabaseContext::create(), "EPSG");
- auto op = factory->createCoordinateOperation("9731", false);
- auto concatenated = nn_dynamic_pointer_cast<ConcatenatedOperation>(op);
- ASSERT_TRUE(concatenated != nullptr);
- EXPECT_EQ(
- concatenated->exportToPROJString(PROJStringFormatter::create().get()),
- "+proj=pipeline "
- "+step +proj=axisswap +order=2,1 "
- "+step +proj=unitconvert +xy_in=deg +xy_out=rad "
- "+step +inv +proj=vgridshift +grids=geo_igm_mar06.grd +multiplier=1 "
- "+step +proj=unitconvert +xy_in=rad +xy_out=deg "
- "+step +proj=axisswap +order=2,1 "
- "+step +proj=geogoffset +dh=0.141");
-}
-
-// ---------------------------------------------------------------------------
-
static bool in(const std::string &str, const std::vector<std::string> &list) {
for (const auto &listItem : list) {
if (str == listItem) {
@@ -1365,7 +1345,8 @@ TEST(factory, AuthorityFactory_build_all_concatenated) {
AuthorityFactory::ObjectType::CONCATENATED_OPERATION, false);
EXPECT_LT(setConcatenatedNoDeprecated.size(), setConcatenated.size());
for (const auto &code : setConcatenated) {
- if (in(code, {"8422", "8481", "8482", "8565", "8566", "8572"})) {
+ if (in(code,
+ {"8422", "8481", "8482", "8565", "8566", "8572", "9731"})) {
EXPECT_THROW(factory->createCoordinateOperation(code, false),
FactoryException)
<< code;