diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-08-24 02:43:29 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2019-08-24 02:43:29 +0200 |
| commit | 74480f7e59aece86d40eaa91933ae40ec4b1dff7 (patch) | |
| tree | 7bc83019718894be570b1cec13e05a4eb20efde7 /src | |
| parent | a0b45b5fc14f183d6eab12582e4722f8a8b9eb4b (diff) | |
| download | PROJ-74480f7e59aece86d40eaa91933ae40ec4b1dff7.tar.gz PROJ-74480f7e59aece86d40eaa91933ae40ec4b1dff7.zip | |
createFromUserInput(): speed-up instanciation with +init=epsg: prefix in lowercase. This showed in MapServer use cases
Diffstat (limited to 'src')
| -rw-r--r-- | src/iso19111/io.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/iso19111/io.cpp b/src/iso19111/io.cpp index cbf5e150..ddef9796 100644 --- a/src/iso19111/io.cpp +++ b/src/iso19111/io.cpp @@ -5502,7 +5502,10 @@ static BaseObjectNNPtr createFromUserInput(const std::string &text, DatabaseContextNNPtr dbContextNNPtr(NN_NO_CHECK(dbContext)); const auto &authName = tokens[0]; const auto &code = tokens[1]; - auto factory = AuthorityFactory::create(dbContextNNPtr, authName); + static const std::string epsg_lowercase("epsg"); + auto factory = AuthorityFactory::create( + dbContextNNPtr, + authName == epsg_lowercase ? Identifier::EPSG : authName); try { return factory->createCoordinateReferenceSystem(code); } catch (...) { |
