diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-10-03 15:10:23 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2019-10-03 15:10:57 +0200 |
| commit | c45855b38f701a66a96cbd3fe4534f6a52c393b1 (patch) | |
| tree | 53b289953383caa461f925ff4a068ca819e304c9 /src | |
| parent | 1a0bb3c0f144219d5881783c4b807888add3092b (diff) | |
| download | PROJ-c45855b38f701a66a96cbd3fe4534f6a52c393b1.tar.gz PROJ-c45855b38f701a66a96cbd3fe4534f6a52c393b1.zip | |
DerivedGeographicCRS: allow exporting +proj=ob_tran +o_proj=longlat to PROJ string
Diffstat (limited to 'src')
| -rw-r--r-- | src/iso19111/crs.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/iso19111/crs.cpp b/src/iso19111/crs.cpp index e4e05166..d0e23f95 100644 --- a/src/iso19111/crs.cpp +++ b/src/iso19111/crs.cpp @@ -4736,8 +4736,18 @@ void DerivedGeographicCRS::_exportToWKT(io::WKTFormatter *formatter) const { // --------------------------------------------------------------------------- void DerivedGeographicCRS::_exportToPROJString( - io::PROJStringFormatter *) const // throw(io::FormattingException) + io::PROJStringFormatter *formatter) const // throw(io::FormattingException) { + const auto &l_conv = derivingConversionRef(); + const auto &methodName = l_conv->method()->nameStr(); + if (methodName == "PROJ ob_tran o_proj=longlat" || + methodName == "PROJ ob_tran o_proj=lonlat" || + methodName == "PROJ ob_tran o_proj=latlong" || + methodName == "PROJ ob_tran o_proj=latlon") { + l_conv->_exportToPROJString(formatter); + return; + } + throw io::FormattingException( "DerivedGeographicCRS cannot be exported to PROJ string"); } |
