[GRASS-SVN] r72549 - grass/trunk/imagery/i.vi

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Mar 24 04:22:48 PDT 2018


Author: veroandreo
Date: 2018-03-24 04:22:48 -0700 (Sat, 24 Mar 2018)
New Revision: 72549

Modified:
   grass/trunk/imagery/i.vi/i.vi.html
   grass/trunk/imagery/i.vi/msavi2.c
Log:
i.vi: corrected MSAVI2 equation according to https://doi.org/10.1016/0034-4257(94)90134-1, see #3385

Modified: grass/trunk/imagery/i.vi/i.vi.html
===================================================================
--- grass/trunk/imagery/i.vi/i.vi.html	2018-03-24 11:15:22 UTC (rev 72548)
+++ grass/trunk/imagery/i.vi/i.vi.html	2018-03-24 11:22:48 UTC (rev 72549)
@@ -179,7 +179,7 @@
 <div class="code"><pre>
 msavi2( redchan, nirchan )
 
-MSAVI2 = (1/2)*(2(NIR+1)-sqrt((2*NIR+1)^2-8(NIR-red)))
+MSAVI2 = (1/2)*(2*NIR+1-sqrt((2*NIR+1)^2-8*(NIR-red)))
 </pre></div>
 
 <p>

Modified: grass/trunk/imagery/i.vi/msavi2.c
===================================================================
--- grass/trunk/imagery/i.vi/msavi2.c	2018-03-24 11:15:22 UTC (rev 72548)
+++ grass/trunk/imagery/i.vi/msavi2.c	2018-03-24 11:22:48 UTC (rev 72549)
@@ -15,7 +15,7 @@
     }
     else 
     {
-	result=0.5*(2*(nirchan+1)-sqrt((2*nirchan+1)*(2*nirchan+1)-8*(nirchan-redchan)));
+	result=0.5*(2*nirchan+1-sqrt((2*nirchan+1)*(2*nirchan+1)-8*(nirchan-redchan)));
     }
     return result;
 }



More information about the grass-commit mailing list