diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2021-03-21 07:21:39 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-21 07:21:39 +0100 |
| commit | afc0af3afd4902708790cd06f84d326cf7834cbd (patch) | |
| tree | d93cc4064584b956bc8545ac73f1e73ed9f38123 /src | |
| parent | 4e5f622590bdaed87096269bd999da931dc08747 (diff) | |
| parent | b14fba985726c097a6105ab447f2bc126c06b082 (diff) | |
| download | PROJ-afc0af3afd4902708790cd06f84d326cf7834cbd.tar.gz PROJ-afc0af3afd4902708790cd06f84d326cf7834cbd.zip | |
Merge pull request #2595 from OSGeo/backport-2594-to-8.0
[Backport 8.0] 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()); } }; |
