[GRASS-SVN] r67657 - grass-addons/grass7/imagery/i.wi

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Jan 25 01:27:55 PST 2016


Author: ychemin
Date: 2016-01-25 01:27:55 -0800 (Mon, 25 Jan 2016)
New Revision: 67657

Modified:
   grass-addons/grass7/imagery/i.wi/awei.c
   grass-addons/grass7/imagery/i.wi/ndwi.c
   grass-addons/grass7/imagery/i.wi/tcw.c
Log:
updated convention

Modified: grass-addons/grass7/imagery/i.wi/awei.c
===================================================================
--- grass-addons/grass7/imagery/i.wi/awei.c	2016-01-24 23:25:08 UTC (rev 67656)
+++ grass-addons/grass7/imagery/i.wi/awei.c	2016-01-25 09:27:55 UTC (rev 67657)
@@ -8,9 +8,9 @@
 Sensing of Environment, 140, 23–35. http://dx.doi.org/10.1016/j.rse.2013.08.029.
      * Landsat TM/ETM+ : 4 × (b2 - b5 ) - (0.25 × b4 + 2.75 × b5 )
      */ 
-double awei_noshadow(double greenchan, double nirchan, double mirchan) 
+double awei_noshadow(double greenchan, double nirchan, double chan5chan) 
 {
-    double result= 4 * (greenchan - mirchan ) - (0.25 * nirchan + 2.75 * mirchan )
+    double result= 4 * (greenchan - chan5chan ) - (0.25 * nirchan + 2.75 * chan5chan )
     return result;
 }
 
@@ -20,8 +20,8 @@
 Sensing of Environment, 140, 23–35. http://dx.doi.org/10.1016/j.rse.2013.08.029.
      * Landsat TM/ETM+ : b1 + 2.5 × b2 - 1.5 × (b4 + b5 ) - 0.25 × b7
      */ 
-double awei_shadow(double bluechan, double greenchan, double nirchan, double mirchan, double band7chan) 
+double awei_shadow(double bluechan, double greenchan, double nirchan, double chan5chan, double band7chan) 
 {
-    double result= bluechan + 2.5 * greenchan - 1.5 * (nirchan + mirchan) - 0.25 * band7chan
+    double result= bluechan + 2.5 * greenchan - 1.5 * (nirchan + chan5chan) - 0.25 * band7chan
     return result;
 }

Modified: grass-addons/grass7/imagery/i.wi/ndwi.c
===================================================================
--- grass-addons/grass7/imagery/i.wi/ndwi.c	2016-01-24 23:25:08 UTC (rev 67656)
+++ grass-addons/grass7/imagery/i.wi/ndwi.c	2016-01-25 09:27:55 UTC (rev 67657)
@@ -27,15 +27,15 @@
 Sensing, 27, 3025–3033. http://dx.doi.org/10.1080/01431160600589179.
      * Landsat TM/ETM+ : (b2-b5)/(b2+b5) (green-MIR)/(green+MIR)
      */ 
-double ndwi_xu(double greenchan, double mirchan) 
+double ndwi_xu(double greenchan, double chan5chan) 
 {
     double result;
 
-    if ((greenchan + mirchan) == 0.0) {
+    if ((greenchan + chan5chan) == 0.0) {
 	result = -1.0;
     }
     else {
-	result = (greenchan - mirchan) / (greenchan + mirchan);
+	result = (greenchan - chan5chan) / (greenchan + chan5chan);
     }
     return result;
 }

Modified: grass-addons/grass7/imagery/i.wi/tcw.c
===================================================================
--- grass-addons/grass7/imagery/i.wi/tcw.c	2016-01-24 23:25:08 UTC (rev 67656)
+++ grass-addons/grass7/imagery/i.wi/tcw.c	2016-01-25 09:27:55 UTC (rev 67657)
@@ -7,8 +7,8 @@
 Remote Sensing of Environment, 17, 301–306.
      * Landsat TM/ETM+ : 0.0315*b1 + 0.2021*b2 + 0.3102*b3 + 0.1594*b4 - 0.6806*b5 - 0.6109*b7
      */ 
-double tcw(double bluechan, double greenchan, double redchan, double nirchan, double nirchan, double band7chan) 
+double tcw(double bluechan, double greenchan, double redchan, double nirchan, double chan5chan, double band7chan) 
 {
-    double result = 0.0315*bluechan + 0.2021*greenchan + 0.3102*redchan + 0.1594*nirchan - 0.6806*mirchan - 0.6109*band7chan;
+    double result = 0.0315*bluechan + 0.2021*greenchan + 0.3102*redchan + 0.1594*nirchan - 0.6806*chan5chan - 0.6109*band7chan;
     return result;
 }



More information about the grass-commit mailing list