From a77ce5cf343c00fc95b5f3d9b2c27e02b6205fd3 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sat, 10 Apr 2021 19:16:44 +0200 Subject: Recognize OGC:84 as an alias of OGC:CRS84 --- src/iso19111/factory.cpp | 3 +++ test/unit/test_factory.cpp | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/src/iso19111/factory.cpp b/src/iso19111/factory.cpp index cf44024f..3367f55c 100644 --- a/src/iso19111/factory.cpp +++ b/src/iso19111/factory.cpp @@ -5019,6 +5019,9 @@ AuthorityFactory::createCoordinateReferenceSystem(const std::string &code, "T", cs::AxisDirection::FUTURE, common::UnitOfMeasure::SECOND))); } + if (code == "84") { + return createCoordinateReferenceSystem("CRS84", false); + } } auto res = d->runWithCodeParam( diff --git a/test/unit/test_factory.cpp b/test/unit/test_factory.cpp index 2bc43b2d..edc8b190 100644 --- a/test/unit/test_factory.cpp +++ b/test/unit/test_factory.cpp @@ -4256,4 +4256,15 @@ TEST(factory, ogc_timecrs) { // --------------------------------------------------------------------------- +TEST(factory, ogc_crs) { + auto ctxt = DatabaseContext::create(); + auto factory = AuthorityFactory::create(ctxt, Identifier::OGC); + factory->createCoordinateReferenceSystem("CRS84"); + factory->createCoordinateReferenceSystem("84"); + factory->createCoordinateReferenceSystem("CRS27"); + factory->createCoordinateReferenceSystem("CRS83"); +} + +// --------------------------------------------------------------------------- + } // namespace -- cgit v1.2.3