aboutsummaryrefslogtreecommitdiff
path: root/test/unit/test_operation.cpp
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2019-01-22 10:58:13 +0100
committerEven Rouault <even.rouault@spatialys.com>2019-01-22 10:58:13 +0100
commitc048292f3b8e408e6a81700a74d9b44d532227ac (patch)
tree4793063b442e2768d7bea3fd1c96f80a55140093 /test/unit/test_operation.cpp
parent5c86b290e2c5686cbf5100eb71e32b0362a989fc (diff)
downloadPROJ-c048292f3b8e408e6a81700a74d9b44d532227ac.tar.gz
PROJ-c048292f3b8e408e6a81700a74d9b44d532227ac.zip
Coordinate operation computation with boundcrs / wktext: drop useless early bindins terms in generated pipeline (fixes #1232)
Diffstat (limited to 'test/unit/test_operation.cpp')
-rw-r--r--test/unit/test_operation.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/unit/test_operation.cpp b/test/unit/test_operation.cpp
index d134f086..ed31f155 100644
--- a/test/unit/test_operation.cpp
+++ b/test/unit/test_operation.cpp
@@ -6320,6 +6320,32 @@ TEST(operation, createOperation_fallback_to_proj4_strings) {
// ---------------------------------------------------------------------------
+TEST(operation, createOperation_on_crs_with_bound_crs_and_wktext) {
+ auto objSrc = PROJStringParser().createFromPROJString(
+ "+proj=utm +zone=55 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 "
+ "+units=m +no_defs +nadgrids=GDA94_GDA2020_conformal.gsb "
+ "+type=crs");
+ auto src = nn_dynamic_pointer_cast<CRS>(objSrc);
+ ASSERT_TRUE(src != nullptr);
+
+ auto objDst = PROJStringParser().createFromPROJString(
+ "+proj=utm +zone=55 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 "
+ "+units=m +no_defs +type=crs");
+ auto dst = nn_dynamic_pointer_cast<CRS>(objDst);
+ ASSERT_TRUE(dst != nullptr);
+
+ auto op = CoordinateOperationFactory::create()->createOperation(
+ NN_CHECK_ASSERT(src), NN_CHECK_ASSERT(dst));
+ ASSERT_TRUE(op != nullptr);
+ EXPECT_EQ(op->exportToPROJString(PROJStringFormatter::create().get()),
+ "+proj=pipeline +step +inv +proj=utm +zone=55 +south "
+ "+ellps=GRS80 +step +proj=hgridshift "
+ "+grids=GDA94_GDA2020_conformal.gsb +step +proj=utm +zone=55 "
+ "+south +ellps=GRS80");
+}
+
+// ---------------------------------------------------------------------------
+
TEST(operation, mercator_variant_A_to_variant_B) {
auto projCRS = ProjectedCRS::create(
PropertyMap(), GeographicCRS::EPSG_4326,