aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2021-04-18 16:29:57 +0200
committerGitHub <noreply@github.com>2021-04-18 16:29:57 +0200
commitc70a7447c1f7ca71534b0b711150784aff5b8dbd (patch)
tree6b59da476222a0e0ecacc056f811d3f06f07deb6 /test
parente4e2991b174ea48b67e9b41c8f356a9cf1bba081 (diff)
parentdd79ca70edcee3dc4f5485a87e11e52cfa2ea041 (diff)
downloadPROJ-c70a7447c1f7ca71534b0b711150784aff5b8dbd.tar.gz
PROJ-c70a7447c1f7ca71534b0b711150784aff5b8dbd.zip
Merge pull request #2676 from rouault/fix_geog_to_geog_deprecated
createOperations(): fix Geog to Geog when one is deprecated (fix master regression)
Diffstat (limited to 'test')
-rw-r--r--test/unit/test_operationfactory.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/unit/test_operationfactory.cpp b/test/unit/test_operationfactory.cpp
index 7e33ca72..4c204c21 100644
--- a/test/unit/test_operationfactory.cpp
+++ b/test/unit/test_operationfactory.cpp
@@ -1033,6 +1033,22 @@ TEST(operation, geogCRS_to_geogCRS_init_IGNF_to_init_IGNF_context) {
// ---------------------------------------------------------------------------
+TEST(operation, geogCRS_to_geogCRS_context_deprecated) {
+ auto authFactory =
+ AuthorityFactory::create(DatabaseContext::create(), "EPSG");
+ auto ctxt = CoordinateOperationContext::create(authFactory, nullptr, 0.0);
+ auto list = CoordinateOperationFactory::create()->createOperations(
+ authFactory->createCoordinateReferenceSystem(
+ "4226"), // Cote d'Ivoire (deprecated)
+ authFactory->createCoordinateReferenceSystem("4258"), // ETRS89
+ ctxt);
+ ASSERT_TRUE(!list.empty());
+ EXPECT_EQ(list[0]->nameStr(),
+ "Ballpark geographic offset from Cote d'Ivoire to ETRS89");
+}
+
+// ---------------------------------------------------------------------------
+
TEST(operation, geogCRS_to_geogCRS_3D) {
auto geogcrs_m_obj = PROJStringParser().createFromPROJString(