From adc9c9976b9b7b41c659b761bc0674db26e83bbd Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Thu, 9 Apr 2020 11:14:18 +0200 Subject: createFromPROJString(): ignore +wktext in '+init=epsg:XXX +wktext' string (refs https://github.com/OSGeo/gdal/issues/2392) --- src/iso19111/io.cpp | 2 +- test/unit/test_io.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/iso19111/io.cpp b/src/iso19111/io.cpp index e358fc10..7c91703c 100644 --- a/src/iso19111/io.cpp +++ b/src/iso19111/io.cpp @@ -9093,7 +9093,7 @@ PROJStringParser::createFromPROJString(const std::string &projString) { bool hasSignificantParamValues = false; for (const auto &kv : d->steps_[0].paramValues) { if (!((kv.key == "type" && kv.value == "crs") || - kv.key == "no_defs")) { + kv.key == "wktext" || kv.key == "no_defs")) { hasSignificantParamValues = true; break; } diff --git a/test/unit/test_io.cpp b/test/unit/test_io.cpp index 92bc6d4b..c029b09b 100644 --- a/test/unit/test_io.cpp +++ b/test/unit/test_io.cpp @@ -8997,8 +8997,8 @@ TEST(io, projparse_init) { { // Test that +no_defs +type=crs have no effect - auto obj = createFromUserInput("+init=epsg:4326 +no_defs +type=crs", - dbContext, true); + auto obj = createFromUserInput( + "+init=epsg:4326 +no_defs +type=crs +wktext", dbContext, true); auto crs = nn_dynamic_pointer_cast(obj); ASSERT_TRUE(crs != nullptr); -- cgit v1.2.3