diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2021-05-12 15:36:11 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2021-05-12 15:36:11 +0200 |
| commit | dedd2916926f1e7b0e9e774918faf6d1a7bcafbb (patch) | |
| tree | d8cf41746f4a6cd8adca1122e01f9e3b575c1569 /src | |
| parent | a962fdc54a427585dff4b04091b13e3db07da9ff (diff) | |
| download | PROJ-dedd2916926f1e7b0e9e774918faf6d1a7bcafbb.tar.gz PROJ-dedd2916926f1e7b0e9e774918faf6d1a7bcafbb.zip | |
Fix export of transformation to PROJ string in a particular situation where CompoundCRS are involved (fixes #2720)
Diffstat (limited to 'src')
| -rw-r--r-- | src/iso19111/operation/transformation.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/iso19111/operation/transformation.cpp b/src/iso19111/operation/transformation.cpp index 8b822d51..6126d325 100644 --- a/src/iso19111/operation/transformation.cpp +++ b/src/iso19111/operation/transformation.cpp @@ -2806,14 +2806,14 @@ void Transformation::_exportToPROJString( common::UnitOfMeasure::ARC_SECOND); auto sourceCRSGeog = - dynamic_cast<const crs::GeographicCRS *>(sourceCRS().get()); + extractGeographicCRSIfGeographicCRSOrEquivalent(sourceCRS()); if (!sourceCRSGeog) { throw io::FormattingException( "Can apply Geographic 2D offsets only to GeographicCRS"); } auto targetCRSGeog = - dynamic_cast<const crs::GeographicCRS *>(targetCRS().get()); + extractGeographicCRSIfGeographicCRSOrEquivalent(targetCRS()); if (!targetCRSGeog) { throw io::FormattingException( "Can apply Geographic 2D offsets only to GeographicCRS"); |
