aboutsummaryrefslogtreecommitdiff
path: root/test/unit/test_operation.cpp
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2019-04-30 17:25:38 +0200
committerEven Rouault <even.rouault@spatialys.com>2019-04-30 17:25:38 +0200
commit09cbfb85c834d99e5a00f5989dc144613e0cfbf2 (patch)
treefa8e83e8a3ee7d91860870684173a871fff5aa86 /test/unit/test_operation.cpp
parentb4a9e65cec051ca3cb16b8cccfa012d70ce10570 (diff)
downloadPROJ-09cbfb85c834d99e5a00f5989dc144613e0cfbf2.tar.gz
PROJ-09cbfb85c834d99e5a00f5989dc144613e0cfbf2.zip
WKT importer: accepts PROJ-based COORDINATEOPERATION
Diffstat (limited to 'test/unit/test_operation.cpp')
-rw-r--r--test/unit/test_operation.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/unit/test_operation.cpp b/test/unit/test_operation.cpp
index 730cd270..a38e9df2 100644
--- a/test/unit/test_operation.cpp
+++ b/test/unit/test_operation.cpp
@@ -6477,6 +6477,18 @@ TEST(operation, compoundCRS_to_compoundCRS_context) {
"+step +proj=hgridshift +grids=conus +step "
"+proj=unitconvert +xy_in=rad +xy_out=deg +step +proj=axisswap "
"+order=2,1");
+ {
+ // Test that we can round-trip this through WKT and still get the same
+ // PROJ string.
+ auto wkt = list[0]->exportToWKT(
+ WKTFormatter::create(WKTFormatter::Convention::WKT2_2018).get());
+ auto obj = WKTParser().createFromWKT(wkt);
+ auto co = nn_dynamic_pointer_cast<CoordinateOperation>(obj);
+ ASSERT_TRUE(co != nullptr);
+ EXPECT_EQ(
+ list[0]->exportToPROJString(PROJStringFormatter::create().get()),
+ co->exportToPROJString(PROJStringFormatter::create().get()));
+ }
bool foundApprox = false;
for (size_t i = 0; i < list.size(); i++) {