aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/iso19111/c_api.cpp4
-rw-r--r--test/unit/test_c_api.cpp9
2 files changed, 13 insertions, 0 deletions
diff --git a/src/iso19111/c_api.cpp b/src/iso19111/c_api.cpp
index 791d75bc..a5e1bc81 100644
--- a/src/iso19111/c_api.cpp
+++ b/src/iso19111/c_api.cpp
@@ -8711,6 +8711,10 @@ PJ *proj_normalize_for_visualization(PJ_CONTEXT *ctx, const PJ *obj) {
if (!pjNew)
return nullptr;
pjNew->ctx = ctx;
+ pjNew->descr = "Set of coordinate operations";
+ pjNew->left = obj->left;
+ pjNew->right = obj->right;
+
for (const auto &alt : obj->alternativeCoordinateOperations) {
auto co = dynamic_cast<const CoordinateOperation *>(
alt.pj->iso_obj.get());
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;