[GRASS-SVN] r32974 - grass-addons/gipe/i.vi
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Aug 21 10:08:23 EDT 2008
Author: ychemin
Date: 2008-08-21 10:08:23 -0400 (Thu, 21 Aug 2008)
New Revision: 32974
Modified:
grass-addons/gipe/i.vi/arvi.c
grass-addons/gipe/i.vi/dvi.c
grass-addons/gipe/i.vi/evi.c
grass-addons/gipe/i.vi/gari.c
grass-addons/gipe/i.vi/gvi.c
grass-addons/gipe/i.vi/msavi.c
grass-addons/gipe/i.vi/msavi2.c
grass-addons/gipe/i.vi/ndvi.c
grass-addons/gipe/i.vi/savi.c
grass-addons/gipe/i.vi/sr.c
grass-addons/gipe/i.vi/wdvi.c
Log:
code cleaning, upgrade, standardization
Modified: grass-addons/gipe/i.vi/arvi.c
===================================================================
--- grass-addons/gipe/i.vi/arvi.c 2008-08-21 14:03:19 UTC (rev 32973)
+++ grass-addons/gipe/i.vi/arvi.c 2008-08-21 14:08:23 UTC (rev 32974)
@@ -8,7 +8,7 @@
red channel, using the difference in the radiance between the blue and the red channels.
(Kaufman and Tanre 1996)*/
-// Atmospheric Resistant Vegetation Index
+/* Atmospheric Resistant Vegetation Index */
double ar_vi( double redchan, double nirchan, double bluechan )
Modified: grass-addons/gipe/i.vi/dvi.c
===================================================================
--- grass-addons/gipe/i.vi/dvi.c 2008-08-21 14:03:19 UTC (rev 32973)
+++ grass-addons/gipe/i.vi/dvi.c 2008-08-21 14:08:23 UTC (rev 32974)
@@ -2,7 +2,7 @@
#include<math.h>
#include<stdlib.h>
-//DVI: Difference Vegetation Index
+/* DVI: Difference Vegetation Index */
double d_vi( double redchan, double nirchan )
{
Modified: grass-addons/gipe/i.vi/evi.c
===================================================================
--- grass-addons/gipe/i.vi/evi.c 2008-08-21 14:03:19 UTC (rev 32973)
+++ grass-addons/gipe/i.vi/evi.c 2008-08-21 14:08:23 UTC (rev 32974)
@@ -2,10 +2,11 @@
#include<math.h>
#include<stdlib.h>
-//EVI: Enhanced Vegetation Index
-//Huete A.R., Liu H.Q., Batchily K., vanLeeuwen W. (1997)
-//A comparison of vegetation indices global set of TM images for EOS-MODIS
-//Remote Sensing of Environment, 59:440-451.
+/* EVI: Enhanced Vegetation Index
+ * Huete A.R., Liu H.Q., Batchily K., vanLeeuwen W. (1997)
+ * A comparison of vegetation indices global set of TM images for EOS-MODIS
+ * Remote Sensing of Environment, 59:440-451.
+ */
double e_vi( double bluechan, double redchan, double nirchan )
{
Modified: grass-addons/gipe/i.vi/gari.c
===================================================================
--- grass-addons/gipe/i.vi/gari.c 2008-08-21 14:03:19 UTC (rev 32973)
+++ grass-addons/gipe/i.vi/gari.c 2008-08-21 14:08:23 UTC (rev 32974)
@@ -1,8 +1,9 @@
#include<stdio.h>
#include<math.h>
#include<stdlib.h>
-//GARI: green atmospherically resistant vegetation index
+/*GARI: green atmospherically resistant vegetation index*/
+
double ga_ri( double redchan, double nirchan, double bluechan, double greenchan )
{
double result;
Modified: grass-addons/gipe/i.vi/gvi.c
===================================================================
--- grass-addons/gipe/i.vi/gvi.c 2008-08-21 14:03:19 UTC (rev 32973)
+++ grass-addons/gipe/i.vi/gvi.c 2008-08-21 14:08:23 UTC (rev 32974)
@@ -2,7 +2,7 @@
#include<math.h>
#include<stdlib.h>
-// Green Vegetation Index
+/* Green Vegetation Index*/
double g_vi( double bluechan, double greenchan, double redchan, double nirchan, double chan5chan, double chan7chan)
Modified: grass-addons/gipe/i.vi/msavi.c
===================================================================
--- grass-addons/gipe/i.vi/msavi.c 2008-08-21 14:03:19 UTC (rev 32973)
+++ grass-addons/gipe/i.vi/msavi.c 2008-08-21 14:08:23 UTC (rev 32974)
@@ -2,17 +2,17 @@
#include<math.h>
#include<stdlib.h>
-// MSAVI: Modified Soil Adjusted Vegetation Index//
-// //
-// s(NIR-s*red-a) //
-// MSAVI = --------------------------- //
-// (a*NIR+red-a*s+X*(1+s*s)) //
-// where a is the soil line intercept, s is the //
-// soil line slope, and X is an adjustment factor //
-// which is set to minimize soil noise (0.08 in //
-// original papers). //
+/* MSAVI: Modified Soil Adjusted Vegetation Index
+ *
+ * s(NIR-s*red-a)
+ * MSAVI = ---------------------------
+ * (a*NIR+red-a*s+X*(1+s*s))
+ * where a is the soil line intercept, s is the
+ * soil line slope, and X is an adjustment factor
+ * which is set to minimize soil noise (0.08 in
+ * original papers).
+ */
-
double msa_vi( double redchan, double nirchan )
{
double result;
Modified: grass-addons/gipe/i.vi/msavi2.c
===================================================================
--- grass-addons/gipe/i.vi/msavi2.c 2008-08-21 14:03:19 UTC (rev 32973)
+++ grass-addons/gipe/i.vi/msavi2.c 2008-08-21 14:08:23 UTC (rev 32974)
@@ -2,11 +2,10 @@
#include<math.h>
#include<stdlib.h>
-// MSAVI2: second Modified Soil Adjusted Vegetation Index
+/* MSAVI2: second Modified Soil Adjusted Vegetation Index
+ * 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)))
-
-
double msa_vi2( double redchan, double nirchan )
{
double result;
Modified: grass-addons/gipe/i.vi/ndvi.c
===================================================================
--- grass-addons/gipe/i.vi/ndvi.c 2008-08-21 14:03:19 UTC (rev 32973)
+++ grass-addons/gipe/i.vi/ndvi.c 2008-08-21 14:08:23 UTC (rev 32974)
@@ -2,7 +2,7 @@
#include<math.h>
#include<stdlib.h>
-// Normalized Difference Vegetation Index
+/* Normalized Difference Vegetation Index*/
double nd_vi( double redchan, double nirchan )
Modified: grass-addons/gipe/i.vi/savi.c
===================================================================
--- grass-addons/gipe/i.vi/savi.c 2008-08-21 14:03:19 UTC (rev 32973)
+++ grass-addons/gipe/i.vi/savi.c 2008-08-21 14:08:23 UTC (rev 32974)
@@ -2,7 +2,7 @@
#include<math.h>
#include<stdlib.h>
-// Soil Adjusted Vegetation Index
+/* Soil Adjusted Vegetation Index*/
double sa_vi( double redchan, double nirchan )
{
Modified: grass-addons/gipe/i.vi/sr.c
===================================================================
--- grass-addons/gipe/i.vi/sr.c 2008-08-21 14:03:19 UTC (rev 32973)
+++ grass-addons/gipe/i.vi/sr.c 2008-08-21 14:08:23 UTC (rev 32974)
@@ -2,7 +2,7 @@
#include<math.h>
#include<stdlib.h>
-// Simple Vegetation ratio
+/* Simple Vegetation ratio*/
double s_r( double redchan, double nirchan )
{
Modified: grass-addons/gipe/i.vi/wdvi.c
===================================================================
--- grass-addons/gipe/i.vi/wdvi.c 2008-08-21 14:03:19 UTC (rev 32973)
+++ grass-addons/gipe/i.vi/wdvi.c 2008-08-21 14:08:23 UTC (rev 32974)
@@ -2,13 +2,13 @@
#include<math.h>
#include<stdlib.h>
-// Weighted Difference Vegetation Index
+/* Weighted Difference Vegetation Index*/
double wd_vi( double redchan, double nirchan )
{
double result;
- double a=1;//slope of soil line //
+ double a=1;/*slope of soil line */
if( ( nirchan + redchan ) == 0.0 ){
result = -1.0;
More information about the grass-commit
mailing list