[GRASS-SVN] r67426 - in grass/branches/releasebranch_7_0/imagery: i.landsat.toar i.vi

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Dec 30 05:01:52 PST 2015


Author: neteler
Date: 2015-12-30 05:01:52 -0800 (Wed, 30 Dec 2015)
New Revision: 67426

Added:
   grass/branches/releasebranch_7_0/imagery/i.vi/i_vi_arvi.png
   grass/branches/releasebranch_7_0/imagery/i.vi/i_vi_gari.png
   grass/branches/releasebranch_7_0/imagery/i.vi/i_vi_ndvi.png
Modified:
   grass/branches/releasebranch_7_0/imagery/i.landsat.toar/i.landsat.toar.html
   grass/branches/releasebranch_7_0/imagery/i.vi/i.vi.html
Log:
i.vi, i.landsat.toar manuals: several examples added

Modified: grass/branches/releasebranch_7_0/imagery/i.landsat.toar/i.landsat.toar.html
===================================================================
--- grass/branches/releasebranch_7_0/imagery/i.landsat.toar/i.landsat.toar.html	2015-12-30 13:00:44 UTC (rev 67425)
+++ grass/branches/releasebranch_7_0/imagery/i.landsat.toar/i.landsat.toar.html	2015-12-30 13:01:52 UTC (rev 67426)
@@ -181,6 +181,8 @@
 
 <h2>EXAMPLES</h2>
 
+<h3>Metadata file examples</h3>
+
 Transform digital numbers of Landsat-7 ETM+ in band rasters 203_30.1,
 203_30.2 [...] to uncorrected at-sensor reflectance in output files
 203_30.1_toar, 203_30.2_toar [...] and at-sensor temperature in output
@@ -202,18 +204,39 @@
 or
 
 <div class="code"><pre>
-i.landsat.toar input=203_30. output=_toar \
-  sensor=tm7 product_date=2004-06-07 date=2001-06-20 \
-  sun_elevation=64.3242970 gain="HHHLHLHHL"
+i.landsat.toar input=LC80160352013134LGN03_B output=toar \
+  metfile=LC80160352013134LGN03_MTL.txt sensor=oli8 date=2013-05-14
 </pre></div>
 
-or
+<h3>DOS1 example</h3>
 
+DN to reflectance using DOS1:
+
 <div class="code"><pre>
-i.landsat.toar input=LC80160352013134LGN03_B output=toar \
-  metfile=LC80160352013134LGN03_MTL.txt sensor=oli8 date=2013-05-14
+# rename channels or make a copy to match i.landsat.toar's input scheme:
+g.copy raster=lsat7_2002_10,lsat7_2002.1
+g.copy raster=lsat7_2002_20,lsat7_2002.2
+g.copy raster=lsat7_2002_30,lsat7_2002.3
+g.copy raster=lsat7_2002_40,lsat7_2002.4
+g.copy raster=lsat7_2002_50,lsat7_2002.5
+g.copy raster=lsat7_2002_61,lsat7_2002.61
+g.copy raster=lsat7_2002_62,lsat7_2002.62
+g.copy raster=lsat7_2002_70,lsat7_2002.7
+g.copy raster=lsat7_2002_80,lsat7_2002.8
 </pre></div>
 
+Calculation of reflectance values from DN using DOS1 (metadata obtained
+from <a href="http://www.grassbook.org/wp-content/uploads/ncexternal/landsat/2002/p016r035_7x20020524.met.gz">p016r035_7x20020524.met.gz</a>):
+
+<div class="code"><pre>
+i.landsat.toar input=lsat7_2002. output=lsat7_2002_toar. sensor=tm7 \
+  method=dos1 date=2002-05-24 sun_elevation=64.7730999 \
+  product_date=2004-02-12 gain=HHHLHLHHL
+</pre></div>
+
+The resulting Landsat channels are names <tt>lsat7_2002_toar.1 .. lsat7_2002_toar.8</tt>.
+
+
 <h2>REFERENCES</h2>
 
 <ul>

Modified: grass/branches/releasebranch_7_0/imagery/i.vi/i.vi.html
===================================================================
--- grass/branches/releasebranch_7_0/imagery/i.vi/i.vi.html	2015-12-30 13:00:44 UTC (rev 67425)
+++ grass/branches/releasebranch_7_0/imagery/i.vi/i.vi.html	2015-12-30 13:01:52 UTC (rev 67426)
@@ -63,7 +63,7 @@
 
 <h3>Vegetation Indices</h3>
 
-ARVI: Atmospheric Resistant Vegetation Index 
+<b>ARVI: Atmospheric Resistant Vegetation Index</b> 
 <p>
 ARVI is resistant to atmospheric effects (in comparison to 
 the NDVI) and is accomplished by a self correcting process 
@@ -72,21 +72,23 @@
 channels (Kaufman and Tanre 1996).
 
 <div class="code"><pre>
+arvi( redchan, nirchan, bluechan )
+
 ARVI = (nirchan - (2.0*redchan - bluechan)) / 
-    ( nirchan + (2.0*redchan - bluechan))
-arvi( redchan, nirchan, bluechan )
+       ( nirchan + (2.0*redchan - bluechan))
 </pre></div>
 
 <p>
-DVI: Difference Vegetation Index
+<b>DVI: Difference Vegetation Index</b>
 
 <div class="code"><pre>
+dvi( redchan, nirchan )
+
 DVI = ( nirchan - redchan )
-dvi( redchan, nirchan )
 </pre></div>
 
 <p>
-EVI: Enhanced Vegetation Index
+<b>EVI: Enhanced Vegetation Index</b>
 <p>
 The enhanced vegetation index (EVI) is an optimized index designed 
 to enhance the vegetation signal with improved sensitivity in high 
@@ -97,13 +99,14 @@
 images for EOS-MODIS. Remote Sensing of Environment, 59:440-451).
 
 <div class="code"><pre>
+evi( bluechan, redchan, nirchan )
+
 EVI = 2.5 * ( nirchan - redchan ) / 
-    ( nirchan + 6.0 * redchan - 7.5 * bluechan + 1.0 )
-evi( bluechan, redchan, nirchan )
+      ( nirchan + 6.0 * redchan - 7.5 * bluechan + 1.0 )
 </pre></div>
 
 <p>
-EVI2: Enhanced Vegetation Index 2
+<b>EVI2: Enhanced Vegetation Index 2</b>
 <p>
 A 2-band EVI (EVI2), without a blue band, which has the best 
 similarity with the 3-band EVI, particularly when atmospheric 
@@ -115,13 +118,14 @@
 <a href="http://dx.doi.org/10.1117/12.734933">doi:10.1117/12.734933</a>).
 
 <div class="code"><pre>
+evi2( redchan, nirchan )
+
 EVI2 = 2.5 * ( nirchan - redchan ) / 
-    ( nirchan + 2.4 * redchan + 1.0 )
-evi2( redchan, nirchan )
+       ( nirchan + 2.4 * redchan + 1.0 )
 </pre></div>
 
 <p>
-GARI: green atmospherically resistant vegetation index
+<b>GARI: green atmospherically resistant vegetation index</b>
 <p>
 The formula was actually defined:
 Gitelson, Anatoly A.; Kaufman, Yoram J.; Merzlyak, Mark N. (1996)
@@ -130,103 +134,118 @@
 <a href="http://dx.doi.org/10.1016/s0034-4257(96)00072-7">doi:10.1016/s0034-4257(96)00072-7</a>
 
 <div class="code"><pre>
+gari( redchan, nirchan, bluechan, greenchan )
+
 GARI = ( nirchan - (greenchan - (bluechan - redchan))) / 
-( nirchan + (greenchan - (bluechan - redchan)))
-gari( redchan, nirchan, bluechan, greenchan )
+       ( nirchan + (greenchan - (bluechan - redchan)))
 </pre></div>
 
 <p>
-GEMI: Global Environmental Monitoring Index
+<b>GEMI: Global Environmental Monitoring Index</b>
 
 <div class="code"><pre>
-GEMI = (( (2*((nirchan * nirchan)-(redchan * redchan))+
-1.5*nirchan+0.5*redchan) / (nirchan + redchan + 0.5)) * 
-(1 - 0.25 * (2*((nirchan * nirchan)-(redchan * redchan))
-+1.5*nirchan+0.5*redchan) /(nirchan + redchan + 0.5)))-
-( (redchan - 0.125) / (1 - redchan))
 gemi( redchan, nirchan )
+
+GEMI = (( (2*((nirchan * nirchan)-(redchan * redchan)) +
+       1.5*nirchan+0.5*redchan) / (nirchan + redchan + 0.5)) * 
+       (1 - 0.25 * (2*((nirchan * nirchan)-(redchan * redchan)) +
+       1.5*nirchan+0.5*redchan) / (nirchan + redchan + 0.5))) -
+       ( (redchan - 0.125) / (1 - redchan))
 </pre></div>
 
 <p>
-GVI: Green Vegetation Index
+<b>GVI: Green Vegetation Index</b>
 
 <div class="code"><pre>
+gvi( bluechan, greenchan, redchan, nirchan, chan5chan, chan7chan)
+
 GVI = ( -0.2848 * bluechan - 0.2435 * greenchan - 
-0.5436 * redchan + 0.7243 * nirchan + 0.0840 * chan5chan-
-0.1800 * chan7chan)
-gvi( bluechan, greenchan, redchan, nirchan, chan5chan, chan7chan)
+      0.5436 * redchan + 0.7243 * nirchan + 0.0840 * chan5chan-
+      0.1800 * chan7chan)
 </pre></div>
 
 <p>
-IPVI: Infrared Percentage Vegetation Index 
+<b>IPVI: Infrared Percentage Vegetation Index</b>
 
 <div class="code"><pre>
+ipvi( redchan, nirchan )
+
 IPVI = nirchan/(nirchan+redchan)
-ipvi( redchan, nirchan )
 </pre></div>
 
-MSAVI2: second Modified Soil Adjusted Vegetation Index
+<p>
+<b>MSAVI2: second Modified Soil Adjusted Vegetation Index</b>
 
 <div class="code"><pre>
+msavi2( redchan, nirchan )
+
 MSAVI2 = (1/2)*(2(NIR+1)-sqrt((2*NIR+1)^2-8(NIR-red)))
-msavi2( redchan, nirchan )
 </pre></div>
 
 <p>
-MSAVI: Modified Soil Adjusted Vegetation Index
+<b>MSAVI: Modified Soil Adjusted Vegetation Index</b>
 
 <div class="code"><pre>
+msavi( redchan, nirchan )
+
 MSAVI = s(NIR-s*red-a) / (a*NIR+red-a*s+X*(1+s*s))	
-msavi( redchan, nirchan )
 </pre></div>
+
 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).
 
 <p>
-NDVI: Normalized Difference Vegetation Index
+<b>NDVI: Normalized Difference Vegetation Index</b>
 
 <div class="code"><pre>
-Data Type Band Numbers ([NIR, Red]) 
-MSS Bands = [7, 5] 
-TM1-5,7 Bands= [4,3] 
-TM8 Bands= [5,4] 
-AVHRR Bands = [2, 1] 
-SPOT XS Bands = [3, 2] 
-AVIRIS Bands = [51, 29] 
+ndvi( redchan, nirchan )
 
+
+Data Type Band Numbers ([NIR, Red])
+  MSS Bands     = [ 7,  5]
+  TM1-5,7 Bands = [ 4,  3]
+  TM8 Bands     = [ 5,  4]
+  AVHRR Bands   = [ 2,  1]
+  SPOT XS Bands = [ 3,  2]
+  AVIRIS Bands  = [51, 29]
+
 NDVI = (NIR - Red) / (NIR + Red)
 </pre></div>
 
 <p>
-PVI: Perpendicular Vegetation Index
+<b>PVI: Perpendicular Vegetation Index</b>
 
 <div class="code"><pre>
+pvi( redchan, nirchan )
+
 PVI = sin(a)NIR-cos(a)red 
-pvi( redchan, nirchan )
 </pre></div>
+
 for a isovegetation lines (lines of equal vegetation)
-would all be parallel to the soil line therefore a=1.
+would all be parallel to the soil line therefore <tt>a=1</tt>.
 
 <p>
-SAVI: Soil Adjusted Vegetation Index
+<b>SAVI: Soil Adjusted Vegetation Index</b>
 
 <div class="code"><pre>
+savi( redchan, nirchan )
+
 SAVI = ((1.0+0.5)*(nirchan - redchan)) / (nirchan + redchan +0.5)
-savi( redchan, nirchan )
 </pre></div>
 
 <p>
-SR: Simple Vegetation ratio
+<b>SR: Simple Vegetation ratio</b>
 
 <div class="code"><pre>
+sr( redchan, nirchan )
+
 SR = (nirchan/redchan)
-sr( redchan, nirchan )
 </pre></div>
 
 <p>
-VARI: Visible Atmospherically Resistant Index
+<b>VARI: Visible Atmospherically Resistant Index</b>
 
 VARI was designed to introduce an atmospheric self-correction 
 (Gitelson A.A., Kaufman Y.J., Stark R., Rundquist D., 2002. Novel 
@@ -234,30 +253,117 @@
 Environment (80), pp76-87.)
 
 <div class="code"><pre>
+vari = ( bluechan, greenchan, redchan )
+
 VARI = (green - red ) / (green + red - blue)
 </pre></div>
 
 <p>
-WDVI: Weighted Difference Vegetation Index
+<b>WDVI: Weighted Difference Vegetation Index</b>
 
 <div class="code"><pre>
+wdvi( redchan, nirchan, soil_line_weight )
+
 WDVI = nirchan - a * redchan
 if(soil_weight_line == None):
-   a = 1.0 #slope of soil line
-wdvi( redchan, nirchan, soil_line_weight )
+   a = 1.0   #slope of soil line
 </pre></div>
 
-<h2>EXAMPLE</h2>
-This example uses a LANDSAT TM5 scene included in the North Carolina sample
-dataset. 
+<h2>EXAMPLES</h2>
 
-<!-- todo: check if i.landsat.toar use is needed for NC data -->
+This example is based on a LANDSAT TM7 scene included in the North Carolina
+sample dataset. 
+
+<h3>Preparation: DN to reflectance</h3>
+
+As a first step, the original DN (digital number) pixel values must be
+converted to reflectance using <em>i.landsat.toar</em>. To do so, we 
+make a copy (or rename the channels) to match <em>i.landsat.toar</em>'s
+input scheme:
+
+<p>
 <div class="code"><pre>
-g.region raster=lsat5_1987_30 -p
-i.vi red=lsat5_1987_30 viname=ndvi output=lsat5_1987.ndvi nir=lsat5_1987_40
-r.colors lsat5_1987.ndvi color=ndvi
+g.copy raster=lsat7_2002_10,lsat7_2002.1
+g.copy raster=lsat7_2002_20,lsat7_2002.2
+g.copy raster=lsat7_2002_30,lsat7_2002.3
+g.copy raster=lsat7_2002_40,lsat7_2002.4
+g.copy raster=lsat7_2002_50,lsat7_2002.5
+g.copy raster=lsat7_2002_61,lsat7_2002.61
+g.copy raster=lsat7_2002_62,lsat7_2002.62
+g.copy raster=lsat7_2002_70,lsat7_2002.7
+g.copy raster=lsat7_2002_80,lsat7_2002.8
 </pre></div>
 
+<p>
+Calculation of reflectance values from DN using DOS1 (metadata obtained
+from <a href="http://www.grassbook.org/wp-content/uploads/ncexternal/landsat/2002/p016r035_7x20020524.met.gz">p016r035_7x20020524.met.gz</a>):
+
+<p>
+<div class="code"><pre>
+i.landsat.toar input=lsat7_2002. output=lsat7_2002_toar. sensor=tm7 \
+  method=dos1 date=2002-05-24 sun_elevation=64.7730999 \
+  product_date=2004-02-12 gain=HHHLHLHHL
+</pre></div>
+
+The resulting Landsat channels are names <tt>lsat7_2002_toar.1 .. lsat7_2002_toar.8</tt>.
+
+<h3>Calculation of NDVI</h3>
+
+The calculation of NDVI from the reflectance values is done as follows:
+
+<div class="code"><pre>
+g.region raster=lsat7_2002_toar.3 -p
+i.vi red=lsat7_2002_toar.3 nir=lsat7_2002_toar.4 viname=ndvi \
+     output=lsat7_2002.ndvi
+r.colors lsat7_2002.ndvi color=ndvi
+
+d.mon wx0
+d.rast.leg lsat7_2002.ndvi
+</pre></div>
+
+<center>
+<img src="i_vi_ndvi.png" alt="North Carolina dataset: NDVI"><br>
+North Carolina dataset: NDVI
+</center>
+
+
+<h3>Calculation of ARVI</h3>
+
+The calculation of ARVI from the reflectance values is done as follows:
+
+<div class="code"><pre>
+g.region raster=lsat7_2002_toar.3 -p
+i.vi blue=lsat7_2002_toar.1 red=lsat7_2002_toar.3 nir=lsat7_2002_toar.4 \
+     viname=arvi output=lsat7_2002.arvi
+
+d.mon wx0
+d.rast.leg lsat7_2002.arvi
+</pre></div>
+
+<center>
+<img src="i_vi_arvi.png" alt="North Carolina dataset: ARVI"><br>
+North Carolina dataset: ARVI
+</center>
+
+
+<h3>Calculation of GARI</h3>
+
+The calculation of GARI from the reflectance values is done as follows:
+
+<div class="code"><pre>
+g.region raster=lsat7_2002_toar.3 -p
+i.vi blue=lsat7_2002_toar.1 green=lsat7_2002_toar.2 red=lsat7_2002_toar.3 \
+     nir=lsat7_2002_toar.4 viname=gari output=lsat7_2002.gari
+
+d.mon wx0
+d.rast.leg lsat7_2002.gari
+</pre></div>
+
+<center>
+<img src="i_vi_gari.png" alt="North Carolina dataset: GARI"><br>
+North Carolina dataset: GARI
+</center>
+
 <h2>NOTES</h2>
 
 Originally from kepler.gps.caltech.edu (<a href="http://www.yale.edu/ceo/Documentation/rsvegfaq.html">FAQ</a>):

Copied: grass/branches/releasebranch_7_0/imagery/i.vi/i_vi_arvi.png (from rev 67425, grass/trunk/imagery/i.vi/i_vi_arvi.png)
===================================================================
(Binary files differ)

Copied: grass/branches/releasebranch_7_0/imagery/i.vi/i_vi_gari.png (from rev 67425, grass/trunk/imagery/i.vi/i_vi_gari.png)
===================================================================
(Binary files differ)

Copied: grass/branches/releasebranch_7_0/imagery/i.vi/i_vi_ndvi.png (from rev 67425, grass/trunk/imagery/i.vi/i_vi_ndvi.png)
===================================================================
(Binary files differ)



More information about the grass-commit mailing list