Skip to content
Snippets Groups Projects
Commit 11534bc5 authored by Guillaume Pasero's avatar Guillaume Pasero
Browse files

BUG: modify gdal patch for ENVI reader

parent 6817f641
No related branches found
No related tags found
No related merge requests found
diff -burN gdal-2.2.1-orig/frmts/raw/envidataset.cpp gdal-2.2.1/frmts/raw/envidataset.cpp
--- gdal-2.2.1-orig/frmts/raw/envidataset.cpp 2017-06-23 14:18:43.000000000 +0200
+++ gdal-2.2.1/frmts/raw/envidataset.cpp 2017-07-17 18:28:05.521732123 +0200
+++ gdal-2.2.1/frmts/raw/envidataset.cpp 2017-07-20 18:25:05.373655046 +0200
@@ -620,10 +620,13 @@
adfGeoTransform[4] != 0.0 || adfGeoTransform[5] != 1.0;
if( bHasNonDefaultGT )
......@@ -17,17 +17,16 @@ diff -burN gdal-2.2.1-orig/frmts/raw/envidataset.cpp gdal-2.2.1/frmts/raw/envida
const double dfRotation = (dfRotation1 + dfRotation2) / 2.0;
if( fabs(dfRotation1 - dfRotation2) > 1e-5 )
@@ -1536,6 +1539,13 @@
@@ -1534,7 +1537,12 @@
// Fallback to localcs if we don't recognise things.
if( oSRS.GetRoot() == NULL )
+ {
oSRS.SetLocalCS(papszFields[0]);
+ // assume that the Y axis isn't flipped
+ adfGeoTransform[2] *= -1.0;
+ adfGeoTransform[5] *= -1.0;
+ }
+ // Arbitrary : assume that the Y axis isn't flipped
+ if( STARTS_WITH_CI(papszFields[0], "Arbitrary" ) )
+ {
+ adfGeoTransform[2] *= -1.0;
+ adfGeoTransform[5] *= -1.0;
+ }
+
// Try to set datum from projection info line if we have a
// projected coordinate system without a GEOGCS.
if( oSRS.IsProjected() && oSRS.GetAttrNode("GEOGCS") == NULL
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment