diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2018-12-22 14:09:58 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2018-12-22 14:09:58 +0100 |
| commit | 0d706c2c8b703c0720f8fce120542e6f650ac6d7 (patch) | |
| tree | 3172dd7b4cf14a83ba3f77a83f5b92596e2f85de /src/crs.cpp | |
| parent | ac6f0021a3ce6110e5a0a917aec9c0c614443e84 (diff) | |
| download | PROJ-0d706c2c8b703c0720f8fce120542e6f650ac6d7.tar.gz PROJ-0d706c2c8b703c0720f8fce120542e6f650ac6d7.zip | |
Support Projected 3D with method name suffixed with ' (3D)', and be more lax on projection parameter names
Diffstat (limited to 'src/crs.cpp')
| -rw-r--r-- | src/crs.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/crs.cpp b/src/crs.cpp index d873e81b..55539e18 100644 --- a/src/crs.cpp +++ b/src/crs.cpp @@ -1060,7 +1060,7 @@ void GeodeticCRS::_exportToWKT(io::WKTFormatter *formatter) const { if (formatter->useESRIDialect()) { if (axisList.size() != 2) { io::FormattingException::Throw( - "Only export of Geographic 2D CRS is supported in ESRI_WKT1"); + "Only export of Geographic 2D CRS is supported in WKT1_ESRI"); } if (l_name == "WGS 84") { @@ -2590,6 +2590,10 @@ void ProjectedCRS::_exportToWKT(io::WKTFormatter *formatter) const { const auto &l_coordinateSystem = d->coordinateSystem(); const auto &axisList = l_coordinateSystem->axisList(); + if (axisList.size() == 3 && !(isWKT2 && formatter->use2018Keywords())) { + io::FormattingException::Throw( + "Projected 3D CRS can only be exported since WKT2:2018"); + } const auto exportAxis = [&l_coordinateSystem, &axisList, &formatter]() { const auto oldAxisOutputRule = formatter->outputAxis(); |
