From 1d6c202f9091d4f733c0824d1fcac2cec87c3a26 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Fri, 24 Sep 2021 17:16:28 +0200 Subject: proj_normalize_for_visualization(): set input and output units when there are several alternative transformations (fixes #2866) --- test/unit/test_c_api.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test') 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; -- cgit v1.2.3