aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-04-09 11:14:18 +0200
committerEven Rouault <even.rouault@spatialys.com>2020-04-09 11:15:05 +0200
commitadc9c9976b9b7b41c659b761bc0674db26e83bbd (patch)
treec4a2193dc6b88af216edc82630ce343f7658edf0
parentc04b2274c3ae359ab0f3f9a197afc9c842b7a983 (diff)
downloadPROJ-adc9c9976b9b7b41c659b761bc0674db26e83bbd.tar.gz
PROJ-adc9c9976b9b7b41c659b761bc0674db26e83bbd.zip
createFromPROJString(): ignore +wktext in '+init=epsg:XXX +wktext' string (refs https://github.com/OSGeo/gdal/issues/2392)
-rw-r--r--src/iso19111/io.cpp2
-rw-r--r--test/unit/test_io.cpp4
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<GeographicCRS>(obj);
ASSERT_TRUE(crs != nullptr);