[GRASS-SVN] r72054 - grass/trunk/imagery/i.atcorr

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Jan 8 07:26:52 PST 2018


Author: mmetz
Date: 2018-01-08 07:26:52 -0800 (Mon, 08 Jan 2018)
New Revision: 72054

Modified:
   grass/trunk/imagery/i.atcorr/iwave.cpp
Log:
i.atcorr: fix loading spectral responses (#3469)

Modified: grass/trunk/imagery/i.atcorr/iwave.cpp
===================================================================
--- grass/trunk/imagery/i.atcorr/iwave.cpp	2018-01-08 06:53:22 UTC (rev 72053)
+++ grass/trunk/imagery/i.atcorr/iwave.cpp	2018-01-08 15:26:52 UTC (rev 72054)
@@ -7872,8 +7872,25 @@
 	else G_warning(_("Unsupported iwave value: %d"), iwave);
     }
 
+    /* set wlinf, wlsup */
+    ffu.wlinf = 0.25;
+    iinf = 0;
+    while (ffu.s[iinf] == 0) {
+	ffu.wlinf += 0.0025;
+	iinf++;
+    }
+
+    ffu.wlsup = 4.0;
+    isup = 1500;
+    while (ffu.s[isup] == 0) {
+	ffu.wlsup -= 0.0025;
+	isup--;
+    }
+
+#if 0
     iinf = (int)((ffu.wlinf - 0.25f) / 0.0025f + 1.5f) - 1;	/* remember indexing */
     isup = (int)((ffu.wlsup - 0.25f) / 0.0025f + 1.5f) - 1;	/*		   "         */
+#endif
 
     if(iwave == 1)	/* moved here to avoid unnecessary gotos */
     {



More information about the grass-commit mailing list