aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2021-09-24 17:16:28 +0200
committerEven Rouault <even.rouault@spatialys.com>2021-09-24 17:16:28 +0200
commit1d6c202f9091d4f733c0824d1fcac2cec87c3a26 (patch)
treeca5d8f99f0deffee972b59c61eabd8f2030a4a20 /test
parent35fe5da17d67f793336decbc6e9280fe8f26ca8f (diff)
downloadPROJ-1d6c202f9091d4f733c0824d1fcac2cec87c3a26.tar.gz
PROJ-1d6c202f9091d4f733c0824d1fcac2cec87c3a26.zip
proj_normalize_for_visualization(): set input and output units when there are several alternative transformations (fixes #2866)
Diffstat (limited to 'test')
-rw-r--r--test/unit/test_c_api.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/unit/test_c_api.cpp b/test/unit/test_c_api.cpp
index 05e99237..dccd2fce 100644
--- a/test/unit/test_c_api.cpp
+++ b/test/unit/test_c_api.cpp
@@ -3998,6 +3998,9 @@ TEST_F(CApi, proj_normalize_for_visualization) {
EXPECT_EQ(std::string(projstr),
"+proj=pipeline +step +proj=unitconvert +xy_in=deg +xy_out=rad "
"+step +proj=utm +zone=31 +ellps=WGS84");
+
+ EXPECT_TRUE(proj_degree_input(Pnormalized, PJ_FWD));
+ EXPECT_FALSE(proj_degree_output(Pnormalized, PJ_FWD));
}
// ---------------------------------------------------------------------------
@@ -4011,6 +4014,9 @@ TEST_F(CApi, proj_normalize_for_visualization_with_alternatives) {
ObjectKeeper keeper_Pnormalized(Pnormalized);
ASSERT_NE(Pnormalized, nullptr);
+ EXPECT_TRUE(proj_degree_input(Pnormalized, PJ_FWD));
+ EXPECT_FALSE(proj_degree_output(Pnormalized, PJ_FWD));
+
{
PJ_COORD c;
// Approximately Roma
@@ -4057,6 +4063,9 @@ TEST_F(CApi, proj_normalize_for_visualization_with_alternatives_reverse) {
ObjectKeeper keeper_Pnormalized(Pnormalized);
ASSERT_NE(Pnormalized, nullptr);
+ EXPECT_FALSE(proj_degree_input(Pnormalized, PJ_FWD));
+ EXPECT_TRUE(proj_degree_output(Pnormalized, PJ_FWD));
+
PJ_COORD c;
// Approximately Roma
c.xyzt.x = 1789912.46264783037;