diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2019-12-16 16:23:20 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-12-16 16:23:20 +0100 |
| commit | 533ca5d12bbb7a4b52fc5cdae439e655f6e54b9c (patch) | |
| tree | 0669d9ef7dfd3b61a53b1972e6acc04dc81074de /src | |
| parent | 59c1f1993b6b62b6320b5faafed0494d0b0ee31c (diff) | |
| parent | 3a035e99f786b61837efcdf56a86748828e1f155 (diff) | |
| download | PROJ-533ca5d12bbb7a4b52fc5cdae439e655f6e54b9c.tar.gz PROJ-533ca5d12bbb7a4b52fc5cdae439e655f6e54b9c.zip | |
Merge pull request #1786 from rouault/fake_EPSG_102100
Make EPSG:102100 resolve to ESRI:102100 (fixes #1730)
Diffstat (limited to 'src')
| -rw-r--r-- | src/iso19111/io.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/iso19111/io.cpp b/src/iso19111/io.cpp index c704e1c1..a67238d9 100644 --- a/src/iso19111/io.cpp +++ b/src/iso19111/io.cpp @@ -5675,6 +5675,14 @@ static BaseObjectNNPtr createFromUserInput(const std::string &text, try { return factory->createCoordinateReferenceSystem(code); } catch (...) { + + // Convenience for well-known misused code + // See https://github.com/OSGeo/PROJ/issues/1730 + if (ci_equal(authName, "EPSG") && code == "102100") { + factory = AuthorityFactory::create(dbContextNNPtr, "ESRI"); + return factory->createCoordinateReferenceSystem(code); + } + const auto authorities = dbContextNNPtr->getAuthorities(); for (const auto &authCandidate : authorities) { if (ci_equal(authCandidate, authName)) { |
