From dedd2916926f1e7b0e9e774918faf6d1a7bcafbb Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Wed, 12 May 2021 15:36:11 +0200 Subject: Fix export of transformation to PROJ string in a particular situation where CompoundCRS are involved (fixes #2720) --- src/iso19111/operation/transformation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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(sourceCRS().get()); + extractGeographicCRSIfGeographicCRSOrEquivalent(sourceCRS()); if (!sourceCRSGeog) { throw io::FormattingException( "Can apply Geographic 2D offsets only to GeographicCRS"); } auto targetCRSGeog = - dynamic_cast(targetCRS().get()); + extractGeographicCRSIfGeographicCRSOrEquivalent(targetCRS()); if (!targetCRSGeog) { throw io::FormattingException( "Can apply Geographic 2D offsets only to GeographicCRS"); -- cgit v1.2.3