diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2021-03-21 00:23:09 +0100 |
|---|---|---|
| committer | github-actions[bot] <github-actions[bot]@users.noreply.github.com> | 2021-03-20 23:23:39 +0000 |
| commit | b14fba985726c097a6105ab447f2bc126c06b082 (patch) | |
| tree | d93cc4064584b956bc8545ac73f1e73ed9f38123 /src | |
| parent | 4e5f622590bdaed87096269bd999da931dc08747 (diff) | |
| download | PROJ-b14fba985726c097a6105ab447f2bc126c06b082.tar.gz PROJ-b14fba985726c097a6105ab447f2bc126c06b082.zip | |
Merge pull request #2594 from rouault/fix_of_fix_2588
createOperations(): fix regression for the fix of #2588
Diffstat (limited to 'src')
| -rw-r--r-- | src/iso19111/operation/coordinateoperationfactory.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/iso19111/operation/coordinateoperationfactory.cpp b/src/iso19111/operation/coordinateoperationfactory.cpp index e4b9617e..39e9bdde 100644 --- a/src/iso19111/operation/coordinateoperationfactory.cpp +++ b/src/iso19111/operation/coordinateoperationfactory.cpp @@ -4888,16 +4888,12 @@ void CoordinateOperationFactory::Private::createOperationsCompoundToGeog( // Lambda to add to the set the name of geodetic datum of the // CRS - const auto addDatumOfToSet = [](std::set<std::string> &set, - const crs::CRSNNPtr &crs) { + const auto addDatumOfToSet = [&dbContext]( + std::set<std::string> &set, + const crs::CRSNNPtr &crs) { auto geodCRS = crs->extractGeodeticCRS(); if (geodCRS) { - const auto &datum = geodCRS->datum(); - if (datum) { - set.insert(datum->nameStr()); - } else { - set.insert(geodCRS->datumEnsemble()->nameStr()); - } + set.insert(geodCRS->datumNonNull(dbContext)->nameStr()); } }; |
