[GRASS-SVN] r67787 - grass/branches/releasebranch_7_0/raster/r.mapcalc

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Feb 8 05:08:08 PST 2016


Author: neteler
Date: 2016-02-08 05:08:08 -0800 (Mon, 08 Feb 2016)
New Revision: 67787

Modified:
   grass/branches/releasebranch_7_0/raster/r.mapcalc/r.mapcalc.html
   grass/branches/releasebranch_7_0/raster/r.mapcalc/r3.mapcalc.html
Log:
r.mapcalc manual: fix if() statement formula (trac #2883)

Modified: grass/branches/releasebranch_7_0/raster/r.mapcalc/r.mapcalc.html
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.mapcalc/r.mapcalc.html	2016-02-08 12:53:24 UTC (rev 67786)
+++ grass/branches/releasebranch_7_0/raster/r.mapcalc/r.mapcalc.html	2016-02-08 13:08:08 UTC (rev 67787)
@@ -646,9 +646,9 @@
 <div class="code"><pre>
 result = if(a,b)
 </pre></div>
-To change all values below 5 to NULL:
+To change all values below 5 to NULL, keep otherwise:
 <div class="code"><pre>
-newmap = if(map<5, null(), 5)
+newmap = if(map < 5, null(), map)
 </pre></div>
 The graph() function allows users to specify a x-y conversion using 
 pairs of x,y coordinates.

Modified: grass/branches/releasebranch_7_0/raster/r.mapcalc/r3.mapcalc.html
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.mapcalc/r3.mapcalc.html	2016-02-08 12:53:24 UTC (rev 67786)
+++ grass/branches/releasebranch_7_0/raster/r.mapcalc/r3.mapcalc.html	2016-02-08 13:08:08 UTC (rev 67787)
@@ -166,6 +166,7 @@
 GRASS commands, not just <em>r3.mapcalc</em>.)
 <p>
 
+
 <h3>The neighborhood modifier</h3>
 
 3D grids are data base files stored in voxel format, i.e., three-dimensional
@@ -517,9 +518,9 @@
 <div class="code"><pre>
 result = if(a,b)
 </pre></div>
-To change all values below 5 to NULL:
+To change all values below 5 to NULL, keep otherwise:
 <div class="code"><pre>
-newmap = if(map<5, null(), 5)
+newmap = if(map < 5, null(), map)
 </pre></div>
 The graph() function allows users to specify a x-y conversion using 
 pairs of x,y coordinates.



More information about the grass-commit mailing list