diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-05-16 15:36:06 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2020-05-16 15:36:06 +0200 |
| commit | f57475aa3b26bf4a5cbf94b579c93a72a54558eb (patch) | |
| tree | a0c55de798d32c69a0311ae4cab6b319a47a5d4e /src/iso19111/io.cpp | |
| parent | 330b2066244f77f89995a1aa195ef4323948a9b9 (diff) | |
| download | PROJ-f57475aa3b26bf4a5cbf94b579c93a72a54558eb.tar.gz PROJ-f57475aa3b26bf4a5cbf94b579c93a72a54558eb.zip | |
Allow importing WKT1 COMPD_CS with a VERT_DATUM[Ellipsoid,2002], and exporting it back as such (on the same object) (fixes #2228)
Diffstat (limited to 'src/iso19111/io.cpp')
| -rw-r--r-- | src/iso19111/io.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/iso19111/io.cpp b/src/iso19111/io.cpp index 9d9fa4a3..ebec053a 100644 --- a/src/iso19111/io.cpp +++ b/src/iso19111/io.cpp @@ -3944,9 +3944,18 @@ VerticalReferenceFrameNNPtr WKTParser::Private::buildVerticalReferenceFrame( modelName); } - // WKT1 VERT_DATUM has a datum type after the datum name that we ignore. - return VerticalReferenceFrame::create(buildProperties(node), - getAnchor(node)); + // WKT1 VERT_DATUM has a datum type after the datum name + const auto *nodeP = node->GP(); + const std::string &name(nodeP->value()); + auto &props = buildProperties(node); + if (ci_equal(name, WKTConstants::VERT_DATUM)) { + const auto &children = nodeP->children(); + if (children.size() >= 2) { + props.set("VERT_DATUM_TYPE", children[1]->GP()->value()); + } + } + + return VerticalReferenceFrame::create(props, getAnchor(node)); } // --------------------------------------------------------------------------- |
