From 5771ac6d4f0ce28c6f9602af2a43ab900edda32c Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sat, 22 Jun 2019 23:52:28 +0200 Subject: +proj=ob_tran +o_proj=longlat: set right unit to PJ_IO_UNITS_WHATEVER so as to be able to chain with unitconvert (fixes #1525) --- src/projections/ob_tran.cpp | 2 +- test/cli/testvarious | 10 ++++++++++ test/cli/tv_out.dist | 5 +++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/projections/ob_tran.cpp b/src/projections/ob_tran.cpp index f9eaa6f0..4ae8dbe7 100644 --- a/src/projections/ob_tran.cpp +++ b/src/projections/ob_tran.cpp @@ -242,7 +242,7 @@ PJ *PROJECTION(ob_tran) { /* Support some rather speculative test cases, where the rotated projection */ /* is actually latlong. We do not want scaling in that case... */ if (Q->link->right==PJ_IO_UNITS_RADIANS) - P->right = PJ_IO_UNITS_PROJECTED; + P->right = PJ_IO_UNITS_WHATEVER; return P; diff --git a/test/cli/testvarious b/test/cli/testvarious index 2e2d854c..836158ca 100755 --- a/test/cli/testvarious +++ b/test/cli/testvarious @@ -975,6 +975,16 @@ $EXE -f %.7f ITRF2000 ITRF1993 -E >> ${OUT} <> ${OUT} +echo "Check ob_tran with o_proj=longlat (#1525)" >> ${OUT} +$EXE -f %.7f +proj=longlat +ellps=GRS80 +to +proj=ob_tran +o_proj=longlat +lon_0=10 +o_lat_p=90 +ellps=GRS80 -E >>${OUT} <> ${OUT} +$EXE -f %.7f -I +proj=longlat +ellps=GRS80 +to +proj=ob_tran +o_proj=longlat +lon_0=10 +o_lat_p=90 +ellps=GRS80 -E >>${OUT} <