[GRASS-SVN] r72266 - grass/branches/releasebranch_7_4/temporal/t.rast.algebra

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Feb 21 11:57:07 PST 2018


Author: neteler
Date: 2018-02-21 11:57:07 -0800 (Wed, 21 Feb 2018)
New Revision: 72266

Modified:
   grass/branches/releasebranch_7_4/temporal/t.rast.algebra/t.rast.algebra.html
Log:
t.rast.algebra manual: add NDVI example; use subsections for examples

Modified: grass/branches/releasebranch_7_4/temporal/t.rast.algebra/t.rast.algebra.html
===================================================================
--- grass/branches/releasebranch_7_4/temporal/t.rast.algebra/t.rast.algebra.html	2018-02-21 19:56:18 UTC (rev 72265)
+++ grass/branches/releasebranch_7_4/temporal/t.rast.algebra/t.rast.algebra.html	2018-02-21 19:57:07 UTC (rev 72266)
@@ -469,6 +469,19 @@
 
 <h2>EXAMPLES</h2>
 
+<h3>Computation of NDVI</h3>
+
+<div class="code"><pre>
+# Sentinel-2 bands are stored separately in two STDRS "S2_b4" and "S2_b8"
+g.region raster=sentinel2_B04_10m -p
+t.rast.list S2_b4
+t.rast.list S2_b8
+t.rast.algebra basename=ndvi expression="ndvi = float(S2_b8 - S2_b4) / ( S2_b8 + S2_b4 )" 
+t.rast.colors input=ndvi color=ndvi
+</pre></div>
+
+<h3>Sum of space-time raster datasets</h3>
+
 Sum maps from STRDS A with maps from STRDS B which have equal time stamps
 and are temporally before Jan. 1. 2005 and store them in STRDS D:
 <div class="code"><pre>
@@ -481,6 +494,8 @@
 C = A + B
 </pre></div>
 
+<h3>Sum of space-time raster datasets with temporal topology relation</h3>
+
 Same expression with explicit definition of the temporal topology relation
 and temporal operators:
 <div class="code"><pre>
@@ -487,6 +502,8 @@
 C = A {+,equal,l} B
 </pre></div>
 
+<h3>Selection of raster cells</h3>
+
 Select all cells from STRDS B with equal temporal relations to STRDS A, if
 the cells of A are in the range [100.0, 1600] of time intervals that have
 more than 30 days (Jan, Mar, May, Jul, Aug, Oct, Dec):
@@ -494,6 +511,8 @@
 C = if(A > 100 && A < 1600 && td(A) > 30, B)
 </pre></div>
 
+<h3>Selection of raster cells with temporal topology relation</h3>
+
 Same expression with explicit definition of the temporal topology relation
 and temporal operators:
 <div class="code"><pre>
@@ -500,6 +519,8 @@
 C = if({equal}, A > 100 && A < 1600 {&&,equal} td(A) > 30, B)
 </pre></div>
 
+<h3>Conditional computation</h3>
+
 Compute the recharge in meters per second for all cells of precipitation
 STRDS "Prec" if the mean temperature specified in STRDS "Temp" is higher
 than 10 degrees. Computation is performed if STRDS "Prec" and "Temp" have
@@ -509,6 +530,8 @@
 C = if(Temp > 10.0, Prec / 3600.0 / 24.0 / td(Prec))
 </pre></div>
 
+<h3>Conditional computation with temporal topology relation</h3>
+
 Same expression with explicit definition of the temporal topology relation
 and temporal operators:
 <div class="code"><pre>
@@ -515,6 +538,7 @@
 C = if({equal}, Temp > 10.0, Prec / 3600.0 / 24.0 {/,equal,l} td(Prec))
 </pre></div>
 
+<h3>Computation with time intervals</h3>
 Compute the mean value of all maps from STRDS A that are located during time
 intervals of STRDS B if more than one map of A is contained in an interval
 of B, use A otherwise. The resulting time intervals are either from B or A:
@@ -522,6 +546,8 @@
 C = if(B {#,contain} A > 1, (B {+,contain,l} A - B) / (B {#,contain} A), A)
 </pre></div>
 
+<h3>Computation with time intervals with temporal topology relation</h3>
+
 Same expression with explicit definition of the temporal topology relation
 and temporal operators:
 <div class="code"><pre>
@@ -528,6 +554,7 @@
 C = if({equal}, B {#,contain} A > 1, (B {+,contain,l} A {-,equal,l} B) {equal,=/} (B {#,contain} A), A)
 </pre></div>
 
+
 <h2>SEE ALSO</h2>
 
 <em>



More information about the grass-commit mailing list