aboutsummaryrefslogtreecommitdiff
path: root/test/unit/test_factory.cpp
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2019-04-16 19:26:16 +0200
committerEven Rouault <even.rouault@spatialys.com>2019-04-16 21:03:19 +0200
commitd9e2a15f2e17b6710ccffa3e271595e006ceadf2 (patch)
treedd69a0bb125a8b4759bd8d1a0d38d1ae56b568bf /test/unit/test_factory.cpp
parentc16c23addf48fcb3c87e18bcfd4ebcf0d873a30d (diff)
downloadPROJ-d9e2a15f2e17b6710ccffa3e271595e006ceadf2.tar.gz
PROJ-d9e2a15f2e17b6710ccffa3e271595e006ceadf2.zip
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.
Diffstat (limited to 'test/unit/test_factory.cpp')
-rw-r--r--test/unit/test_factory.cpp12
1 files changed, 10 insertions, 2 deletions
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<std::string>{"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();
}
}