From 6d2af0904652baba69ec81261c914e9b68221dac Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Wed, 16 Jan 2019 17:17:54 +0100 Subject: PROJBasedOperation: write it as a conformant CONVERSION WKT, and make it parsed appropriately on the reading side --- test/unit/test_io.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test/unit/test_io.cpp') 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(obj); + ASSERT_TRUE(transf != nullptr); + EXPECT_EQ(transf->exportToPROJString(PROJStringFormatter::create().get()), + "+proj=merc"); +} + +// --------------------------------------------------------------------------- + TEST(wkt_parse, CONCATENATEDOPERATION) { auto transf_1 = Transformation::create( -- cgit v1.2.3