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:14:18 +0200
commitc2751ebc4f2d75f7110a046e690f4a801a6b9bcb (patch)
tree944e3473927fff9fdfd1cce4e495f7bff0b9fb95
parentdca4be189ce91e0f73b1f18f3aaf4708b8d47e77 (diff)
downloadPROJ-c2751ebc4f2d75f7110a046e690f4a801a6b9bcb.tar.gz
PROJ-c2751ebc4f2d75f7110a046e690f4a801a6b9bcb.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 dfc1aa27..868095d4 100644
--- a/src/iso19111/io.cpp
+++ b/src/iso19111/io.cpp
@@ -9230,7 +9230,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 6cdd3014..c95b1b57 100644
--- a/test/unit/test_io.cpp
+++ b/test/unit/test_io.cpp
@@ -9167,8 +9167,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);