diff -burN gdal-2.4.1_orig/frmts/raw/envidataset.cpp gdal-2.4.1/frmts/raw/envidataset.cpp
--- gdal-2.4.1_orig/frmts/raw/envidataset.cpp	2019-03-29 14:48:15.444066736 +0100
+++ gdal-2.4.1/frmts/raw/envidataset.cpp	2019-03-29 14:48:49.556067582 +0100
@@ -618,10 +618,13 @@
         adfGeoTransform[4] != 0.0 || adfGeoTransform[5] != 1.0;
     if( bHasNonDefaultGT )
     {
+        const double dfDet = adfGeoTransform[1] * adfGeoTransform[5] -
+                             adfGeoTransform[2] * adfGeoTransform[4];
+        const double dfSign = (dfDet>0.0 ? 1.0 : -1.0);
         const double dfRotation1 =
-            -atan2(-adfGeoTransform[2], adfGeoTransform[1]) * kdfRadToDeg;
+            -atan2(dfSign * adfGeoTransform[2], adfGeoTransform[1]) * kdfRadToDeg;
         const double dfRotation2 =
-            -atan2(-adfGeoTransform[4], -adfGeoTransform[5]) * kdfRadToDeg;
+            -atan2(-adfGeoTransform[4], dfSign * adfGeoTransform[5]) * kdfRadToDeg;
         const double dfRotation = (dfRotation1 + dfRotation2) / 2.0;
 
         if( fabs(dfRotation1 - dfRotation2) > 1e-5 )
@@ -1530,7 +1533,12 @@
 
     // Fallback to localcs if we don't recognise things.
     if( oSRS.GetRoot() == nullptr )
+      {
         oSRS.SetLocalCS(papszFields[0]);
+      // assume that the Y axis isn't flipped
+      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.
