diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2021-04-05 20:53:20 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2021-04-05 21:30:52 +0200 |
| commit | 34e93f11392e6966ed5bbaced983dea444157419 (patch) | |
| tree | 5be17896aa2506481f8e48a9a8968ee135456cab /test/unit/test_operationfactory.cpp | |
| parent | 3ae02ac091440298808e6ea0ba76ae692ded06bb (diff) | |
| download | PROJ-34e93f11392e6966ed5bbaced983dea444157419.tar.gz PROJ-34e93f11392e6966ed5bbaced983dea444157419.zip | |
createOperations(): make createBetweenGeodeticCRSWithDatumBasedIntermediates() reachable...
... and optimize its execution time by rewriting it completely.
This code path was no longer triggered in tests since EPSG got a direct
transformation for GDA94 to WGS 84 (G1762).
Diffstat (limited to 'test/unit/test_operationfactory.cpp')
| -rw-r--r-- | test/unit/test_operationfactory.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/unit/test_operationfactory.cpp b/test/unit/test_operationfactory.cpp index 218d8700..7e33ca72 100644 --- a/test/unit/test_operationfactory.cpp +++ b/test/unit/test_operationfactory.cpp @@ -1531,6 +1531,37 @@ TEST(operation, geocentric_to_geogCRS_3D_different_datum_context) { // --------------------------------------------------------------------------- +TEST(operation, createBetweenGeodeticCRSWithDatumBasedIntermediates) { + auto dbContext = DatabaseContext::create(); + auto authFactoryEPSG = AuthorityFactory::create(dbContext, "EPSG"); + auto ctxt = + CoordinateOperationContext::create(authFactoryEPSG, nullptr, 0.0); + auto list = CoordinateOperationFactory::create()->createOperations( + // IG05/12 Intermediate CRS + authFactoryEPSG->createCoordinateReferenceSystem("6990"), + // ITRF2014 + authFactoryEPSG->createCoordinateReferenceSystem("9000"), ctxt); + ASSERT_EQ(list.size(), 1U); + EXPECT_EQ(list[0]->nameStr(), + "Inverse of ITRF2008 to IG05/12 Intermediate CRS + " + "Conversion from ITRF2008 (geog2D) to ITRF2008 (geocentric) + " + "ITRF2008 to ITRF2014 (1) + " + "Conversion from ITRF2014 (geocentric) to ITRF2014 (geog2D)"); + + auto listInv = CoordinateOperationFactory::create()->createOperations( + // ITRF2014 + authFactoryEPSG->createCoordinateReferenceSystem("9000"), + // IG05/12 Intermediate CRS + authFactoryEPSG->createCoordinateReferenceSystem("6990"), ctxt); + ASSERT_EQ(listInv.size(), 1U); + EXPECT_EQ(listInv[0]->nameStr(), + "Conversion from ITRF2014 (geog2D) to ITRF2014 (geocentric) + " + "Inverse of ITRF2008 to ITRF2014 (1) + " + "Conversion from ITRF2008 (geocentric) to ITRF2008 (geog2D) + " + "ITRF2008 to IG05/12 Intermediate CRS"); +} + +// --------------------------------------------------------------------------- TEST(operation, esri_projectedCRS_to_geogCRS_with_ITRF_intermediate_context) { auto dbContext = DatabaseContext::create(); auto authFactoryEPSG = AuthorityFactory::create(dbContext, "EPSG"); |
