diff --git a/src/iso19111/io.cpp b/src/iso19111/io.cpp index bd29c310d7..d4b3dcb04b 100644 --- a/src/iso19111/io.cpp +++ b/src/iso19111/io.cpp @@ -6626,9 +6626,9 @@ static BaseObjectNNPtr createFromUserInput(const std::string &text, }; // urn:ogc:def:crs:EPSG::4326 - if (tokens.size() == 7 && tokens[0] == "urn") { + if (tokens.size() == 7 && tolower(tokens[0]) == "urn") { - const auto &type = tokens[3]; + const auto type = tokens[3] == "CRS" ? "crs" : tokens[3]; const auto &authName = tokens[4]; const auto &code = tokens[6]; return createFromURNPart(type, authName, code); diff --git a/test/unit/test_io.cpp b/test/unit/test_io.cpp index 780db16d25..cd880a3f22 100644 --- a/test/unit/test_io.cpp +++ b/test/unit/test_io.cpp @@ -10360,6 +10360,10 @@ TEST(io, createFromUserInput) { EXPECT_NO_THROW( createFromUserInput("urn:ogc:def:ellipsoid:EPSG::7030", dbContext)); + // Found as srsName in some GMLs... + EXPECT_NO_THROW( + createFromUserInput("URN:OGC:DEF:CRS:OGC:1.3:CRS84", dbContext)); + // Legacy formulations EXPECT_NO_THROW( createFromUserInput("urn:x-ogc:def:crs:EPSG::4326", dbContext));