File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed
Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -3482,8 +3482,28 @@ bool SingleOperation::exportToPROJStringGeneric(
34823482
34833483 auto sourceCRSGeod =
34843484 dynamic_cast <const crs::GeodeticCRS *>(sourceCRS ().get ());
3485+ if (!sourceCRSGeod) {
3486+ auto sourceCRSCompound =
3487+ dynamic_cast <const crs::CompoundCRS *>(sourceCRS ().get ());
3488+ if (sourceCRSCompound) {
3489+ sourceCRSGeod = dynamic_cast <const crs::GeodeticCRS *>(
3490+ sourceCRSCompound->componentReferenceSystems ()
3491+ .front ()
3492+ .get ());
3493+ }
3494+ }
34853495 auto targetCRSGeod =
34863496 dynamic_cast <const crs::GeodeticCRS *>(targetCRS ().get ());
3497+ if (!targetCRSGeod) {
3498+ auto targetCRSCompound =
3499+ dynamic_cast <const crs::CompoundCRS *>(targetCRS ().get ());
3500+ if (targetCRSCompound) {
3501+ targetCRSGeod = dynamic_cast <const crs::GeodeticCRS *>(
3502+ targetCRSCompound->componentReferenceSystems ()
3503+ .front ()
3504+ .get ());
3505+ }
3506+ }
34873507 if (sourceCRSGeod && targetCRSGeod) {
34883508 auto sourceCRSGeog =
34893509 dynamic_cast <const crs::GeographicCRS *>(sourceCRSGeod);
Original file line number Diff line number Diff line change @@ -1853,3 +1853,17 @@ tests:
18531853 +step +inv +proj=cart +ellps=WGS84
18541854 +step +proj=unitconvert +xy_in=rad +xy_out=deg
18551855 +step +proj=axisswap +order=2,1
1856+ - comment : >
1857+ Test 'WGS 84 (Gxxx) + EGM2008 height' to 'WGS 84 (Gyyy) + EGM2008 height'
1858+ args : -s "WGS 84 (G1150) + EGM2008 height" -t "WGS 84 (G1674) + EGM2008 height" -o PROJ -q
1859+ out : |
1860+ +proj=pipeline
1861+ +step +proj=axisswap +order=2,1
1862+ +step +proj=unitconvert +xy_in=deg +xy_out=rad
1863+ +step +proj=cart +ellps=WGS84
1864+ +step +proj=helmert +x=-0.0024 +y=0.0016 +z=0.0232 +rx=-0.00027 +ry=0.00027
1865+ +rz=-0.00038 +s=0.00208 +dx=-0.0001 +dy=-0.0001 +dz=0.0018 +drx=0 +dry=0
1866+ +drz=0 +ds=-8e-05 +t_epoch=2005 +convention=coordinate_frame
1867+ +step +inv +proj=cart +ellps=WGS84
1868+ +step +proj=unitconvert +xy_in=rad +xy_out=deg
1869+ +step +proj=axisswap +order=2,1
You can’t perform that action at this time.
0 commit comments