From d9e2a15f2e17b6710ccffa3e271595e006ceadf2 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Tue, 16 Apr 2019 19:26:16 +0200 Subject: createOperations(): do not attempt using a unrelated datum intermediate when doing geog2D<-->geog3D conversions of same datum Seen when testing transformations between "CR 05" (EPSG:5365) and "CR-SIRGAS" (EPSG:8907) which require going through their corresponding 3D GeogCRS to find a Helmert transformation. --- test/unit/test_factory.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'test/unit/test_factory.cpp') diff --git a/test/unit/test_factory.cpp b/test/unit/test_factory.cpp index 1ceef475..91024d62 100644 --- a/test/unit/test_factory.cpp +++ b/test/unit/test_factory.cpp @@ -1518,12 +1518,20 @@ class FactoryWithTmpDatabase : public ::testing::Test { const auto vals = std::vector{"SOURCE", "TARGET", "PIVOT"}; for (const auto &val : vals) { + ASSERT_TRUE( + execute("INSERT INTO geodetic_datum " + "VALUES('FOO','" + + val + "','" + val + + "','',NULL," + "'EPSG','7030','EPSG','8901','EPSG','1262',0);")) + << last_error(); ASSERT_TRUE(execute("INSERT INTO geodetic_crs " "VALUES('NS_" + val + "','" + val + "','" + val + "',NULL,NULL,'geographic 2D','EPSG','6422'," - "'EPSG','6326'," - "'EPSG','1262',NULL,0);")) + "'FOO','" + + val + "'," + "'EPSG','1262',NULL,0);")) << last_error(); } } -- cgit v1.2.3