diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-11-18 23:54:57 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2019-11-18 23:54:57 +0100 |
| commit | 10434b1f053bb8c58f522ab8be9abe21504acd17 (patch) | |
| tree | 5bedde9ac1191586b465069055560d93c9f9a1ba /test/unit/test_operation.cpp | |
| parent | 360657d16d1974e096d8d3bb61e18fee35598d1a (diff) | |
| download | PROJ-10434b1f053bb8c58f522ab8be9abe21504acd17.tar.gz PROJ-10434b1f053bb8c58f522ab8be9abe21504acd17.zip | |
createFromCRSCodesWithIntermediates(): do not consider intermediate CRS whose datum has a publication date older than the source and target datums
Diffstat (limited to 'test/unit/test_operation.cpp')
| -rw-r--r-- | test/unit/test_operation.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/unit/test_operation.cpp b/test/unit/test_operation.cpp index 73f5dbdc..01ebf219 100644 --- a/test/unit/test_operation.cpp +++ b/test/unit/test_operation.cpp @@ -4783,6 +4783,27 @@ TEST(operation, geogCRS_to_geogCRS_context_concatenated_operation) { // --------------------------------------------------------------------------- +TEST(operation, geogCRS_to_geogCRS_context_ED50_to_WGS72_no_NTF_intermediate) { + auto authFactory = + AuthorityFactory::create(DatabaseContext::create(), "EPSG"); + auto ctxt = CoordinateOperationContext::create(authFactory, nullptr, 0.0); + ctxt->setSpatialCriterion( + CoordinateOperationContext::SpatialCriterion::PARTIAL_INTERSECTION); + auto list = CoordinateOperationFactory::create()->createOperations( + authFactory->createCoordinateReferenceSystem("4230"), // ED50 + authFactory->createCoordinateReferenceSystem("4322"), // WGS 72 + ctxt); + ASSERT_GE(list.size(), 2U); + // We should not use the ancient NTF as an intermediate when looking for + // ED50 -> WGS 72 operations. + for (const auto &op : list) { + EXPECT_TRUE(op->nameStr().find("NTF") == std::string::npos) + << op->nameStr(); + } +} + +// --------------------------------------------------------------------------- + TEST(operation, geogCRS_to_geogCRS_context_same_grid_name) { auto authFactory = AuthorityFactory::create(DatabaseContext::create(), "EPSG"); |
