From a377a0e1ac5d2809703e8e83b368f26d171e5f9b Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Wed, 11 Sep 2019 16:22:32 +0200 Subject: createFromPROJString(): ignore +no_defs when instanciating a '+init=epsg:xxxx +no_defs' string (related to #1597) --- test/unit/test_io.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test/unit/test_io.cpp') diff --git a/test/unit/test_io.cpp b/test/unit/test_io.cpp index 2642ed23..52608a4a 100644 --- a/test/unit/test_io.cpp +++ b/test/unit/test_io.cpp @@ -8640,6 +8640,17 @@ TEST(io, projparse_init) { .get())); } + { + // Test that +no_defs +type=crs have no effect + auto obj = createFromUserInput("+init=epsg:4326 +no_defs +type=crs", + dbContext, true); + auto crs = nn_dynamic_pointer_cast(obj); + ASSERT_TRUE(crs != nullptr); + + auto wkt = crs->exportToWKT(WKTFormatter::create().get()); + EXPECT_TRUE(wkt.find("GEODCRS[\"WGS 84\"") == 0) << wkt; + } + { // EPSG:3040 is normally northing-easting order, but in compatibillity // mode it will be easting-northing -- cgit v1.2.3