Browse Source

i.vi, i.landsat.toar manuals: several examples added

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@67426 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Neteler 9 years ago
parent
commit
367d679976

+ 29 - 6
imagery/i.landsat.toar/i.landsat.toar.html

@@ -181,6 +181,8 @@ correct calibration constants, which were changed in the dates:
 
 
 <h2>EXAMPLES</h2>
 <h2>EXAMPLES</h2>
 
 
+<h3>Metadata file examples</h3>
+
 Transform digital numbers of Landsat-7 ETM+ in band rasters 203_30.1,
 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.2 [...] to uncorrected at-sensor reflectance in output files
 203_30.1_toar, 203_30.2_toar [...] and at-sensor temperature in output
 203_30.1_toar, 203_30.2_toar [...] and at-sensor temperature in output
@@ -202,18 +204,39 @@ i.landsat.toar input=L5121060_06020060714. \
 or
 or
 
 
 <div class="code"><pre>
 <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>
 </pre></div>
 
 
-or
+<h3>DOS1 example</h3>
+
+DN to reflectance using DOS1:
 
 
 <div class="code"><pre>
 <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>
 </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>
 <h2>REFERENCES</h2>
 
 
 <ul>
 <ul>

+ 162 - 56
imagery/i.vi/i.vi.html

@@ -63,7 +63,7 @@ correction to use with <em>i.vi</em>.
 
 
 <h3>Vegetation Indices</h3>
 <h3>Vegetation Indices</h3>
 
 
-ARVI: Atmospheric Resistant Vegetation Index 
+<b>ARVI: Atmospheric Resistant Vegetation Index</b> 
 <p>
 <p>
 ARVI is resistant to atmospheric effects (in comparison to 
 ARVI is resistant to atmospheric effects (in comparison to 
 the NDVI) and is accomplished by a self correcting process 
 the NDVI) and is accomplished by a self correcting process 
@@ -72,21 +72,23 @@ difference in the radiance between the blue and the red
 channels (Kaufman and Tanre 1996).
 channels (Kaufman and Tanre 1996).
 
 
 <div class="code"><pre>
 <div class="code"><pre>
-ARVI = (nirchan - (2.0*redchan - bluechan)) / 
-    ( nirchan + (2.0*redchan - bluechan))
 arvi( redchan, nirchan, bluechan )
 arvi( redchan, nirchan, bluechan )
+
+ARVI = (nirchan - (2.0*redchan - bluechan)) / 
+       ( nirchan + (2.0*redchan - bluechan))
 </pre></div>
 </pre></div>
 
 
 <p>
 <p>
-DVI: Difference Vegetation Index
+<b>DVI: Difference Vegetation Index</b>
 
 
 <div class="code"><pre>
 <div class="code"><pre>
-DVI = ( nirchan - redchan )
 dvi( redchan, nirchan )
 dvi( redchan, nirchan )
+
+DVI = ( nirchan - redchan )
 </pre></div>
 </pre></div>
 
 
 <p>
 <p>
-EVI: Enhanced Vegetation Index
+<b>EVI: Enhanced Vegetation Index</b>
 <p>
 <p>
 The enhanced vegetation index (EVI) is an optimized index designed 
 The enhanced vegetation index (EVI) is an optimized index designed 
 to enhance the vegetation signal with improved sensitivity in high 
 to enhance the vegetation signal with improved sensitivity in high 
@@ -97,13 +99,14 @@ W. (1997). A comparison of vegetation indices global set of TM
 images for EOS-MODIS. Remote Sensing of Environment, 59:440-451).
 images for EOS-MODIS. Remote Sensing of Environment, 59:440-451).
 
 
 <div class="code"><pre>
 <div class="code"><pre>
-EVI = 2.5 * ( nirchan - redchan ) / 
-    ( nirchan + 6.0 * redchan - 7.5 * bluechan + 1.0 )
 evi( bluechan, redchan, nirchan )
 evi( bluechan, redchan, nirchan )
+
+EVI = 2.5 * ( nirchan - redchan ) / 
+      ( nirchan + 6.0 * redchan - 7.5 * bluechan + 1.0 )
 </pre></div>
 </pre></div>
 
 
 <p>
 <p>
-EVI2: Enhanced Vegetation Index 2
+<b>EVI2: Enhanced Vegetation Index 2</b>
 <p>
 <p>
 A 2-band EVI (EVI2), without a blue band, which has the best 
 A 2-band EVI (EVI2), without a blue band, which has the best 
 similarity with the 3-band EVI, particularly when atmospheric 
 similarity with the 3-band EVI, particularly when atmospheric 
@@ -115,13 +118,14 @@ Sustainability IV, 667905 (october 09, 2007)
 <a href="http://dx.doi.org/10.1117/12.734933">doi:10.1117/12.734933</a>).
 <a href="http://dx.doi.org/10.1117/12.734933">doi:10.1117/12.734933</a>).
 
 
 <div class="code"><pre>
 <div class="code"><pre>
-EVI2 = 2.5 * ( nirchan - redchan ) / 
-    ( nirchan + 2.4 * redchan + 1.0 )
 evi2( redchan, nirchan )
 evi2( redchan, nirchan )
+
+EVI2 = 2.5 * ( nirchan - redchan ) / 
+       ( nirchan + 2.4 * redchan + 1.0 )
 </pre></div>
 </pre></div>
 
 
 <p>
 <p>
-GARI: green atmospherically resistant vegetation index
+<b>GARI: green atmospherically resistant vegetation index</b>
 <p>
 <p>
 The formula was actually defined:
 The formula was actually defined:
 Gitelson, Anatoly A.; Kaufman, Yoram J.; Merzlyak, Mark N. (1996)
 Gitelson, Anatoly A.; Kaufman, Yoram J.; Merzlyak, Mark N. (1996)
@@ -130,103 +134,118 @@ MODIS, Remote Sensing of Environment 58 (3), 289-298.
 <a href="http://dx.doi.org/10.1016/s0034-4257(96)00072-7">doi:10.1016/s0034-4257(96)00072-7</a>
 <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>
 <div class="code"><pre>
-GARI = ( nirchan - (greenchan - (bluechan - redchan))) / 
-( nirchan + (greenchan - (bluechan - redchan)))
 gari( redchan, nirchan, bluechan, greenchan )
 gari( redchan, nirchan, bluechan, greenchan )
+
+GARI = ( nirchan - (greenchan - (bluechan - redchan))) / 
+       ( nirchan + (greenchan - (bluechan - redchan)))
 </pre></div>
 </pre></div>
 
 
 <p>
 <p>
-GEMI: Global Environmental Monitoring Index
+<b>GEMI: Global Environmental Monitoring Index</b>
 
 
 <div class="code"><pre>
 <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( 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>
 </pre></div>
 
 
 <p>
 <p>
-GVI: Green Vegetation Index
+<b>GVI: Green Vegetation Index</b>
 
 
 <div class="code"><pre>
 <div class="code"><pre>
-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)
 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)
 </pre></div>
 </pre></div>
 
 
 <p>
 <p>
-IPVI: Infrared Percentage Vegetation Index 
+<b>IPVI: Infrared Percentage Vegetation Index</b>
 
 
 <div class="code"><pre>
 <div class="code"><pre>
-IPVI = nirchan/(nirchan+redchan)
 ipvi( redchan, nirchan )
 ipvi( redchan, nirchan )
+
+IPVI = nirchan/(nirchan+redchan)
 </pre></div>
 </pre></div>
 
 
-MSAVI2: second Modified Soil Adjusted Vegetation Index
+<p>
+<b>MSAVI2: second Modified Soil Adjusted Vegetation Index</b>
 
 
 <div class="code"><pre>
 <div class="code"><pre>
-MSAVI2 = (1/2)*(2(NIR+1)-sqrt((2*NIR+1)^2-8(NIR-red)))
 msavi2( redchan, nirchan )
 msavi2( redchan, nirchan )
+
+MSAVI2 = (1/2)*(2(NIR+1)-sqrt((2*NIR+1)^2-8(NIR-red)))
 </pre></div>
 </pre></div>
 
 
 <p>
 <p>
-MSAVI: Modified Soil Adjusted Vegetation Index
+<b>MSAVI: Modified Soil Adjusted Vegetation Index</b>
 
 
 <div class="code"><pre>
 <div class="code"><pre>
-MSAVI = s(NIR-s*red-a) / (a*NIR+red-a*s+X*(1+s*s))	
 msavi( redchan, nirchan )
 msavi( redchan, nirchan )
+
+MSAVI = s(NIR-s*red-a) / (a*NIR+red-a*s+X*(1+s*s))	
 </pre></div>
 </pre></div>
+
 where a is the soil line intercept, s is the
 where a is the soil line intercept, s is the
 soil line slope, and X 	is an adjustment factor
 soil line slope, and X 	is an adjustment factor
 which is set to minimize soil noise (0.08 in 
 which is set to minimize soil noise (0.08 in 
 original papers).
 original papers).
 
 
 <p>
 <p>
-NDVI: Normalized Difference Vegetation Index
+<b>NDVI: Normalized Difference Vegetation Index</b>
 
 
 <div class="code"><pre>
 <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)
 NDVI = (NIR - Red) / (NIR + Red)
 </pre></div>
 </pre></div>
 
 
 <p>
 <p>
-PVI: Perpendicular Vegetation Index
+<b>PVI: Perpendicular Vegetation Index</b>
 
 
 <div class="code"><pre>
 <div class="code"><pre>
-PVI = sin(a)NIR-cos(a)red 
 pvi( redchan, nirchan )
 pvi( redchan, nirchan )
+
+PVI = sin(a)NIR-cos(a)red 
 </pre></div>
 </pre></div>
+
 for a isovegetation lines (lines of equal vegetation)
 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>
 <p>
-SAVI: Soil Adjusted Vegetation Index
+<b>SAVI: Soil Adjusted Vegetation Index</b>
 
 
 <div class="code"><pre>
 <div class="code"><pre>
-SAVI = ((1.0+0.5)*(nirchan - redchan)) / (nirchan + redchan +0.5)
 savi( redchan, nirchan )
 savi( redchan, nirchan )
+
+SAVI = ((1.0+0.5)*(nirchan - redchan)) / (nirchan + redchan +0.5)
 </pre></div>
 </pre></div>
 
 
 <p>
 <p>
-SR: Simple Vegetation ratio
+<b>SR: Simple Vegetation ratio</b>
 
 
 <div class="code"><pre>
 <div class="code"><pre>
-SR = (nirchan/redchan)
 sr( redchan, nirchan )
 sr( redchan, nirchan )
+
+SR = (nirchan/redchan)
 </pre></div>
 </pre></div>
 
 
 <p>
 <p>
-VARI: Visible Atmospherically Resistant Index
+<b>VARI: Visible Atmospherically Resistant Index</b>
 
 
 VARI was designed to introduce an atmospheric self-correction 
 VARI was designed to introduce an atmospheric self-correction 
 (Gitelson A.A., Kaufman Y.J., Stark R., Rundquist D., 2002. Novel 
 (Gitelson A.A., Kaufman Y.J., Stark R., Rundquist D., 2002. Novel 
@@ -234,30 +253,117 @@ algorithms for estimation of vegetation fraction Remote Sensing of
 Environment (80), pp76-87.)
 Environment (80), pp76-87.)
 
 
 <div class="code"><pre>
 <div class="code"><pre>
+vari = ( bluechan, greenchan, redchan )
+
 VARI = (green - red ) / (green + red - blue)
 VARI = (green - red ) / (green + red - blue)
 </pre></div>
 </pre></div>
 
 
 <p>
 <p>
-WDVI: Weighted Difference Vegetation Index
+<b>WDVI: Weighted Difference Vegetation Index</b>
 
 
 <div class="code"><pre>
 <div class="code"><pre>
+wdvi( redchan, nirchan, soil_line_weight )
+
 WDVI = nirchan - a * redchan
 WDVI = nirchan - a * redchan
 if(soil_weight_line == None):
 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>EXAMPLES</h2>
+
+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.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>
 </pre></div>
 
 
-<h2>EXAMPLE</h2>
-This example uses a LANDSAT TM5 scene included in the North Carolina sample
-dataset. 
+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:
 
 
-<!-- todo: check if i.landsat.toar use is needed for NC data -->
 <div class="code"><pre>
 <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.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>
 </pre></div>
 
 
+<center>
+<img src="i_vi_gari.png" alt="North Carolina dataset: GARI"><br>
+North Carolina dataset: GARI
+</center>
+
 <h2>NOTES</h2>
 <h2>NOTES</h2>
 
 
 Originally from kepler.gps.caltech.edu (<a href="http://www.yale.edu/ceo/Documentation/rsvegfaq.html">FAQ</a>):
 Originally from kepler.gps.caltech.edu (<a href="http://www.yale.edu/ceo/Documentation/rsvegfaq.html">FAQ</a>):

BIN
imagery/i.vi/i_vi_arvi.png


BIN
imagery/i.vi/i_vi_gari.png


BIN
imagery/i.vi/i_vi_ndvi.png