diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2018-12-02 22:27:51 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2018-12-02 22:27:51 +0100 |
| commit | 9577f8e018a7fd3fe57fc934259f441cbf22cb1d (patch) | |
| tree | 507a0b9a164943eab6c4c8b8e62cb51d5e4b0ef3 /src | |
| parent | 0ab18674d2b1ea8060ce6eb59c676f9ce98d50fb (diff) | |
| download | PROJ-9577f8e018a7fd3fe57fc934259f441cbf22cb1d.tar.gz PROJ-9577f8e018a7fd3fe57fc934259f441cbf22cb1d.zip | |
identify: improve GeographicCRS identification when the CRS name has no match
Diffstat (limited to 'src')
| -rw-r--r-- | src/crs.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/crs.cpp b/src/crs.cpp index 21df43b4..699af09a 100644 --- a/src/crs.cpp +++ b/src/crs.cpp @@ -1329,6 +1329,7 @@ GeodeticCRS::identify(const io::AuthorityFactoryPtr &authorityFactory) const { } } } else { + bool gotAbove25Pct = false; for (int ipass = 0; ipass < 2; ipass++) { const bool approximateMatch = ipass == 1; auto objects = authorityFactory->createObjectsFromName( @@ -1348,6 +1349,7 @@ GeodeticCRS::identify(const io::AuthorityFactoryPtr &authorityFactory) const { metadata::Identifier::isEquivalentName( thisName.c_str(), crs->nameStr().c_str()); res.emplace_back(crsNN, eqName ? 90 : 70); + gotAbove25Pct = true; } else { res.emplace_back(crsNN, 25); } @@ -1356,7 +1358,7 @@ GeodeticCRS::identify(const io::AuthorityFactoryPtr &authorityFactory) const { break; } } - if (res.empty() && thisDatum) { + if (!gotAbove25Pct && thisDatum) { if (!thisDatum->identifiers().empty()) { searchByDatum(); } else { |
