diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-04-02 22:36:37 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2020-04-03 10:05:48 +0200 |
| commit | f4827e0a3b5c5b07ccf82fc6cd3334079e75e02c (patch) | |
| tree | 43e14921ef9030a9d6aa7c90cc0643082d162f5a /src/iso19111/io.cpp | |
| parent | d2467ab2af59bec9187ee81742aca366e471352d (diff) | |
| download | PROJ-f4827e0a3b5c5b07ccf82fc6cd3334079e75e02c.tar.gz PROJ-f4827e0a3b5c5b07ccf82fc6cd3334079e75e02c.zip | |
Make sure that importing a Projected 3D CRS from WKT:2019 keeps the base geographic CRS as 3D (fixes #2122)
Diffstat (limited to 'src/iso19111/io.cpp')
| -rw-r--r-- | src/iso19111/io.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/iso19111/io.cpp b/src/iso19111/io.cpp index 6a1d7e32..8bfb4395 100644 --- a/src/iso19111/io.cpp +++ b/src/iso19111/io.cpp @@ -3839,6 +3839,12 @@ WKTParser::Private::buildProjectedCRS(const WKTNodeNNPtr &node) { ThrowNotExpectedCSType("Cartesian"); } + if (cartesianCS->axisList().size() == 3 && + baseGeodCRS->coordinateSystem()->axisList().size() == 2) { + baseGeodCRS = NN_NO_CHECK(util::nn_dynamic_pointer_cast<GeodeticCRS>( + baseGeodCRS->promoteTo3D(std::string(), dbContext_))); + } + addExtensionProj4ToProp(nodeP, props); return ProjectedCRS::create(props, baseGeodCRS, conversion, |
