diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-10-21 11:41:51 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-21 11:41:51 +0200 |
| commit | b61a1d0575791173bbcc9c61f8c19acd52e1162f (patch) | |
| tree | 87825317534c3d41159ea56497bf053f8b240e61 /src/iso19111/datum.cpp | |
| parent | 6b8ef545c4200180cc1b4bf7179d0b0951029ae5 (diff) | |
| parent | 31f272708eaba9274b4b3c02240e9e7012c6b2b8 (diff) | |
| download | PROJ-b61a1d0575791173bbcc9c61f8c19acd52e1162f.tar.gz PROJ-b61a1d0575791173bbcc9c61f8c19acd52e1162f.zip | |
Merge pull request #2386 from rouault/improve_compoundcrs_identification
Improve CompoundCRS identification and name morphing in VerticalCRS with ESRI WKT1
Diffstat (limited to 'src/iso19111/datum.cpp')
| -rw-r--r-- | src/iso19111/datum.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/iso19111/datum.cpp b/src/iso19111/datum.cpp index 7d42fd13..5bc8074c 100644 --- a/src/iso19111/datum.cpp +++ b/src/iso19111/datum.cpp @@ -1933,8 +1933,23 @@ void VerticalReferenceFrame::_exportToWKT( ? io::WKTConstants::VDATUM : io::WKTConstants::VERT_DATUM, !identifiers().empty()); - const auto &l_name = nameStr(); + auto l_name = nameStr(); if (!l_name.empty()) { + if (!isWKT2 && formatter->useESRIDialect()) { + bool aliasFound = false; + const auto &dbContext = formatter->databaseContext(); + if (dbContext) { + auto l_alias = dbContext->getAliasFromOfficialName( + l_name, "vertical_datum", "ESRI"); + if (!l_alias.empty()) { + l_name = l_alias; + aliasFound = true; + } + } + if (!aliasFound) { + l_name = io::WKTFormatter::morphNameToESRI(l_name); + } + } formatter->addQuotedString(l_name); } else { formatter->addQuotedString("unnamed"); |
