aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2019-06-07 10:41:04 +0200
committerGitHub <noreply@github.com>2019-06-07 10:41:04 +0200
commit148e9e9c7b2e0077297a53d7eb648e6a3b6a92e7 (patch)
treed51c3e3b369beae8ef6580b815e77f87005b17a1
parentb8b8f3639c48de3ca5146284a6c0b548d94d3a4c (diff)
parented5916b3e9964a97dcbfa12ccc2ab4fac30b56bd (diff)
downloadPROJ-148e9e9c7b2e0077297a53d7eb648e6a3b6a92e7.tar.gz
PROJ-148e9e9c7b2e0077297a53d7eb648e6a3b6a92e7.zip
Merge pull request #1510 from OSGeo/backport-1509-to-6.1
[Backport 6.1] WKT1 importer: do case insensitive comparison for axis direction
-rw-r--r--src/iso19111/io.cpp2
-rw-r--r--test/unit/test_io.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/iso19111/io.cpp b/src/iso19111/io.cpp
index 17673c5f..008106b4 100644
--- a/src/iso19111/io.cpp
+++ b/src/iso19111/io.cpp
@@ -2311,7 +2311,7 @@ WKTParser::Private::buildAxis(const WKTNodeNNPtr &node,
direction = &AxisDirection::GEOCENTRIC_Z;
} else if (dirString == AxisDirectionWKT1::OTHER.toString()) {
direction = &AxisDirection::UNSPECIFIED;
- } else if (!direction && AxisDirectionWKT1::valueOf(dirString) != nullptr) {
+ } else if (!direction && AxisDirectionWKT1::valueOf(toupper(dirString)) != nullptr) {
direction = AxisDirection::valueOf(tolower(dirString));
}
diff --git a/test/unit/test_io.cpp b/test/unit/test_io.cpp
index 820e052a..6d2d72cd 100644
--- a/test/unit/test_io.cpp
+++ b/test/unit/test_io.cpp
@@ -1018,7 +1018,7 @@ TEST(wkt_parse, wkt1_projected) {
" PARAMETER[\"false_northing\",0],\n"
" UNIT[\"metre\",1,\n"
" AUTHORITY[\"EPSG\",\"9001\"]],\n"
- " AXIS[\"(E)\",EAST],\n"
+ " AXIS[\"(E)\",East],\n" // should normally be uppercase
" AXIS[\"(N)\",NORTH],\n"
" AUTHORITY[\"EPSG\",\"32631\"]]";
auto obj = WKTParser()