Ver código fonte

r.mapcalc: Improve documentation to clarify LHS/RHS issues. Fixes https://trac.osgeo.org/grass/ticket/2986 and https://trac.osgeo.org/grass/ticket/2770 (backport from trunk https://trac.osgeo.org/grass/changeset/68268).

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@68269 15284696-431f-4ddb-bdfa-cd5b030d7da7
Maris Nartiss 9 anos atrás
pai
commit
53a3f812e4
2 arquivos alterados com 23 adições e 2 exclusões
  1. 15 1
      raster/r.mapcalc/r.mapcalc.html
  2. 8 1
      raster/r.mapcalc/r3.mapcalc.html

+ 15 - 1
raster/r.mapcalc/r.mapcalc.html

@@ -680,7 +680,21 @@ X (map) values supplied and y (newmap) values returned:
 
 
 <h2>KNOWN ISSUES</h2>
 <h2>KNOWN ISSUES</h2>
 
 
-Continuation lines must end with a <tt>\</tt> and have <em>no</em> trailing
+<p>The <em>result</em> variable on the left hand side of the equation should not
+appear in the <em>expression</em> on the right hand side.
+<div class="code"><pre>
+<s>mymap = if( mymap > 0, mymap, 0)</s>
+</pre></div>
+<p>Any maps generated by an r.mapcalc command only exist after the entire
+command has completed. All maps are generated concurrently, row-by-row
+(i.e. there is an implicit "for row in rows {...}" around the entire expression).
+Thus #, @ and [ ] operators can not be used on a map generated within same
+r.mapcalc command run.
+<div class="code"><pre>
+newmap = oldmap * 3.14
+<s>othermap = newmap[-1, 0] / newmap[1, 0]</s>
+</pre></div>
+<p>Continuation lines must end with a <tt>\</tt> and have <em>no</em> trailing
 white space (blanks or tabs). If the user does leave white space at the end of
 white space (blanks or tabs). If the user does leave white space at the end of
 continuation lines, the error messages produced by <em>r.mapcalc</em> will
 continuation lines, the error messages produced by <em>r.mapcalc</em> will
 be meaningless and the equation will not work as the user intended.
 be meaningless and the equation will not work as the user intended.

+ 8 - 1
raster/r.mapcalc/r3.mapcalc.html

@@ -552,7 +552,14 @@ X (map) values supplied and y (newmap) values returned:
 
 
 <h2>KNOWN ISSUES</h2>
 <h2>KNOWN ISSUES</h2>
 
 
-Continuation lines must end with a <tt>\</tt> and have <em>no</em> trailing
+<p>The <em>result</em> variable on the left hand side of the equation should not
+appear in the <em>expression</em> on the right hand side.
+<p>Any maps generated by an r3.mapcalc command only exist after the entire
+command has completed. All maps are generated concurrently, row-by-row
+(i.e. there is an implicit "for row in rows {...}" around the entire expression).
+Thus #, @ and [ ] operators can not be used on a map generated within same
+r3.mapcalc command run.
+<p>Continuation lines must end with a <tt>\</tt> and have <em>no</em> trailing
 white space (blanks or tabs). If the user does leave white space at the end of
 white space (blanks or tabs). If the user does leave white space at the end of
 continuation lines, the error messages produced by <em>r3.mapcalc</em> will
 continuation lines, the error messages produced by <em>r3.mapcalc</em> will
 be meaningless and the equation will not work as the user intended.
 be meaningless and the equation will not work as the user intended.