aboutsummaryrefslogtreecommitdiff
path: root/test/unit/gie_self_tests.cpp
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2019-02-16 19:19:43 +0100
committerEven Rouault <even.rouault@spatialys.com>2019-02-16 19:19:43 +0100
commit9689243b940e6b908db377dee357f422a00129e8 (patch)
treef5c0b79c46db32575b1203e9b92de3a798cd328f /test/unit/gie_self_tests.cpp
parentfd0f8849bb8a217e5f7c788f65f47a5b90bc1720 (diff)
downloadPROJ-9689243b940e6b908db377dee357f422a00129e8.tar.gz
PROJ-9689243b940e6b908db377dee357f422a00129e8.zip
Make sure that the PJ object returned by proj_create_crs_to_crs() is a proper CoordinateOperation so that we can call proj_get_source_crs() on it for example
Diffstat (limited to 'test/unit/gie_self_tests.cpp')
-rw-r--r--test/unit/gie_self_tests.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/unit/gie_self_tests.cpp b/test/unit/gie_self_tests.cpp
index 7f9f436b..91a3069c 100644
--- a/test/unit/gie_self_tests.cpp
+++ b/test/unit/gie_self_tests.cpp
@@ -258,6 +258,12 @@ TEST_F(gieTest, proj_create_crs_to_crs) {
a = proj_trans(P, PJ_FWD, a);
EXPECT_NEAR(a.xy.x, b.xy.x, 1e-9);
EXPECT_NEAR(a.xy.y, b.xy.y, 1e-9);
+
+ auto src = proj_get_source_crs(PJ_DEFAULT_CTX, P);
+ ASSERT_TRUE(src != nullptr);
+ EXPECT_EQ(proj_get_name(src), std::string("ETRS89 / UTM zone 32N"));
+ proj_destroy(src);
+
proj_destroy(P);
/* we can also allow PROJ strings as a usable PJ */