aboutsummaryrefslogtreecommitdiff
path: root/src/transform.cpp
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-01-17 00:24:03 +0100
committerEven Rouault <even.rouault@spatialys.com>2020-01-17 00:52:19 +0100
commit4724025e6c817761052fc0dc8810fd489a9e0104 (patch)
tree21117e52f95b8f36880efef8cd71c1fcec21242c /src/transform.cpp
parent66fd99a8831955034cb25c8468ecfe1f9d3a7d62 (diff)
parentd76e6202d27c730b4dcbf16b8c1575c11b703485 (diff)
downloadPROJ-4724025e6c817761052fc0dc8810fd489a9e0104.tar.gz
PROJ-4724025e6c817761052fc0dc8810fd489a9e0104.zip
Merge branch 'master' into rfc4_merge_back_master
Diffstat (limited to 'src/transform.cpp')
-rw-r--r--src/transform.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/transform.cpp b/src/transform.cpp
index 811e2a6a..ea3d9ae2 100644
--- a/src/transform.cpp
+++ b/src/transform.cpp
@@ -234,6 +234,14 @@ static int geographic_to_projected (PJ *P, long n, int dist, double *x, double *
return 0;
}
+ // Ugly hack. See https://github.com/OSGeo/PROJ/issues/1782
+ if( P->right == PJ_IO_UNITS_WHATEVER && P->descr &&
+ strncmp(P->descr, "General Oblique Transformation",
+ strlen("General Oblique Transformation")) == 0 )
+ {
+ P->right = PJ_IO_UNITS_PROJECTED;
+ }
+
for( i = 0; i <n; i++ )
{
PJ_XY projected_loc;
@@ -345,6 +353,14 @@ static int projected_to_geographic (PJ *P, long n, int dist, double *x, double *
return 0;
}
+ // Ugly hack. See https://github.com/OSGeo/PROJ/issues/1782
+ if( P->right == PJ_IO_UNITS_WHATEVER && P->descr &&
+ strncmp(P->descr, "General Oblique Transformation",
+ strlen("General Oblique Transformation")) == 0 )
+ {
+ P->right = PJ_IO_UNITS_PROJECTED;
+ }
+
/* Fallback to the original PROJ.4 API 2d inversion - inv */
for( i = 0; i < n; i++ ) {
PJ_XY projected_loc;