aboutsummaryrefslogtreecommitdiff
path: root/test/unit/test_io.cpp
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2019-01-16 17:17:54 +0100
committerEven Rouault <even.rouault@spatialys.com>2019-01-16 17:18:30 +0100
commit6d2af0904652baba69ec81261c914e9b68221dac (patch)
tree289e2af7e0cb472d633e2357804e696714d1557b /test/unit/test_io.cpp
parent15bbaa50ae6e5779462bb921a5f50126a2f2f252 (diff)
downloadPROJ-6d2af0904652baba69ec81261c914e9b68221dac.tar.gz
PROJ-6d2af0904652baba69ec81261c914e9b68221dac.zip
PROJBasedOperation: write it as a conformant CONVERSION WKT, and make it parsed appropriately on the reading side
Diffstat (limited to 'test/unit/test_io.cpp')
-rw-r--r--test/unit/test_io.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/unit/test_io.cpp b/test/unit/test_io.cpp
index 2b5eeffc..43b74fd8 100644
--- a/test/unit/test_io.cpp
+++ b/test/unit/test_io.cpp
@@ -2280,6 +2280,20 @@ TEST(wkt_parse, COORDINATEOPERATION) {
// ---------------------------------------------------------------------------
+TEST(wkt_parse, conversion_proj_based) {
+
+ auto wkt = "CONVERSION[\"PROJ-based coordinate operation\",\n"
+ " METHOD[\"PROJ-based operation method: +proj=merc\"]]";
+
+ auto obj = WKTParser().createFromWKT(wkt);
+ auto transf = nn_dynamic_pointer_cast<SingleOperation>(obj);
+ ASSERT_TRUE(transf != nullptr);
+ EXPECT_EQ(transf->exportToPROJString(PROJStringFormatter::create().get()),
+ "+proj=merc");
+}
+
+// ---------------------------------------------------------------------------
+
TEST(wkt_parse, CONCATENATEDOPERATION) {
auto transf_1 = Transformation::create(