aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2019-06-23 12:05:51 +0200
committerGitHub <noreply@github.com>2019-06-23 12:05:51 +0200
commit954bd87db12618e3264d0d5dc8a01b6bf82fec71 (patch)
tree0599144567099b0a6f62f41aa0f4bcbc4687fc7d
parentb5341a102a0442ebeb3c7e89dd769c5b03000e8c (diff)
parent11a53b7c0255087c2b324b36147deb837902dfb9 (diff)
downloadPROJ-954bd87db12618e3264d0d5dc8a01b6bf82fec71.tar.gz
PROJ-954bd87db12618e3264d0d5dc8a01b6bf82fec71.zip
[Backport 6.1] +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) (#1527)
[Backport 6.1] +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)
-rw-r--r--src/projections/ob_tran.cpp2
-rwxr-xr-xtest/cli/testvarious10
-rw-r--r--test/cli/tv_out.dist5
3 files changed, 16 insertions, 1 deletions
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} <<EOF
59.4967 -117.61748 329.396 1988
EOF
+echo "##############################################################" >> ${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} <<EOF
+-122 46
+EOF
+echo "Test inverse handling" >> ${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} <<EOF
+-122 46
+EOF
+
# Done!
# do 'diff' with distribution results
diff --git a/test/cli/tv_out.dist b/test/cli/tv_out.dist
index dcda5275..13987332 100644
--- a/test/cli/tv_out.dist
+++ b/test/cli/tv_out.dist
@@ -468,3 +468,8 @@ Test EPSG:4896 to EPSG:7930
Test ITRF2000 to ITRF1993
59.4967 -117.61748 329.396 59.4967002 -117.6174799 329.3845529
59.4967 -117.61748 329.396 59.4967002 -117.6174799 329.3845529 1988
+##############################################################
+Check ob_tran with o_proj=longlat (#1525)
+-122 46 -132.0000000 46.0000000 0.0000000
+Test inverse handling
+-122 46 -112.0000000 46.0000000 0.0000000