diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-05-17 20:47:15 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-17 20:47:15 +0200 |
| commit | b349fa73847740950b2c5f5e6e1f5769ab594b44 (patch) | |
| tree | dd00105bf829d5bcc4bf8104999bd454c87c3f50 /src/iso19111/datum.cpp | |
| parent | 2d6b5c0a9a1e0f0f92e69c641a16377ef36f8270 (diff) | |
| parent | 6a3371ea66098b13f83414519317b3fe72d7a148 (diff) | |
| download | PROJ-b349fa73847740950b2c5f5e6e1f5769ab594b44.tar.gz PROJ-b349fa73847740950b2c5f5e6e1f5769ab594b44.zip | |
Merge pull request #2229 from rouault/fix_2228
Allow importing WKT1 COMPD_CS with a VERT_DATUM[Ellipsoid,2002]
Diffstat (limited to 'src/iso19111/datum.cpp')
| -rw-r--r-- | src/iso19111/datum.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/iso19111/datum.cpp b/src/iso19111/datum.cpp index 03abb0d7..33eb81fa 100644 --- a/src/iso19111/datum.cpp +++ b/src/iso19111/datum.cpp @@ -1788,6 +1788,9 @@ operator=(const RealizationMethod &other) { //! @cond Doxygen_Suppress struct VerticalReferenceFrame::Private { util::optional<RealizationMethod> realizationMethod_{}; + + // 2005 = CS_VD_GeoidModelDerived from OGC 01-009 + std::string wkt1DatumType_{"2005"}; }; //! @endcond @@ -1837,12 +1840,21 @@ VerticalReferenceFrameNNPtr VerticalReferenceFrame::create( realizationMethodIn)); rf->setAnchor(anchor); rf->setProperties(properties); + properties.getStringValue("VERT_DATUM_TYPE", rf->d->wkt1DatumType_); return rf; } // --------------------------------------------------------------------------- //! @cond Doxygen_Suppress +const std::string &VerticalReferenceFrame::getWKT1DatumType() const { + return d->wkt1DatumType_; +} +//! @endcond + +// --------------------------------------------------------------------------- + +//! @cond Doxygen_Suppress void VerticalReferenceFrame::_exportToWKT( io::WKTFormatter *formatter) const // throw(FormattingException) { @@ -1861,7 +1873,7 @@ void VerticalReferenceFrame::_exportToWKT( if (isWKT2) { Datum::getPrivate()->exportAnchorDefinition(formatter); } else if (!formatter->useESRIDialect()) { - formatter->add(2005); // CS_VD_GeoidModelDerived from OGC 01-009 + formatter->add(d->wkt1DatumType_); const auto &extension = formatter->getVDatumExtension(); if (!extension.empty()) { formatter->startNode(io::WKTConstants::EXTENSION, false); |
