aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/apps/proj.cpp8
-rw-r--r--src/transform.cpp16
2 files changed, 24 insertions, 0 deletions
diff --git a/src/apps/proj.cpp b/src/apps/proj.cpp
index 7fe08023..09c8a81d 100644
--- a/src/apps/proj.cpp
+++ b/src/apps/proj.cpp
@@ -490,6 +490,14 @@ int main(int argc, char **argv) {
exit(0);
}
+ // Ugly hack. See https://github.com/OSGeo/PROJ/issues/1782
+ if( Proj->right == PJ_IO_UNITS_WHATEVER && Proj->descr &&
+ strncmp(Proj->descr, "General Oblique Transformation",
+ strlen("General Oblique Transformation")) == 0 )
+ {
+ Proj->right = PJ_IO_UNITS_PROJECTED;
+ }
+
if (inverse) {
if (!Proj->inv)
emess(3,"inverse projection not available");
diff --git a/src/transform.cpp b/src/transform.cpp
index d111d835..781c0061 100644
--- a/src/transform.cpp
+++ b/src/transform.cpp
@@ -231,6 +231,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;
@@ -342,6 +350,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;