|
@@ -4,7 +4,6 @@ New raster map layers can be created which are arithmetic expressions
|
|
involving existing raster map layers, integer or floating point constants,
|
|
involving existing raster map layers, integer or floating point constants,
|
|
and functions.
|
|
and functions.
|
|
|
|
|
|
-
|
|
|
|
<h3>Program use</h3>
|
|
<h3>Program use</h3>
|
|
|
|
|
|
<em>r.mapcalc</em> expression have the form:
|
|
<em>r.mapcalc</em> expression have the form:
|
|
@@ -680,20 +679,24 @@ X (map) values supplied and y (newmap) values returned:
|
|
|
|
|
|
<h2>KNOWN ISSUES</h2>
|
|
<h2>KNOWN ISSUES</h2>
|
|
|
|
|
|
-<p>The <em>result</em> variable on the left hand side of the equation should not
|
|
|
|
|
|
+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.
|
|
appear in the <em>expression</em> on the right hand side.
|
|
|
|
+
|
|
<div class="code"><pre>
|
|
<div class="code"><pre>
|
|
-<s>mymap = if( mymap > 0, mymap, 0)</s>
|
|
|
|
|
|
+<s>mymap = if( mymap > 0, mymap, 0)</s>
|
|
</pre></div>
|
|
</pre></div>
|
|
-<p>Any maps generated by an r.mapcalc command only exist after the entire
|
|
|
|
|
|
+
|
|
|
|
+<p>Any maps generated by a <em>r.mapcalc</em> command only exist after the entire
|
|
command has completed. All maps are generated concurrently, row-by-row
|
|
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).
|
|
(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.
|
|
|
|
|
|
+Thus the <tt>#</tt>, <tt>@</tt>, and <tt>[ ]</tt> operators cannot be used on a map
|
|
|
|
+generated within same <em>r.mapcalc</em> command run.
|
|
|
|
+
|
|
<div class="code"><pre>
|
|
<div class="code"><pre>
|
|
newmap = oldmap * 3.14
|
|
newmap = oldmap * 3.14
|
|
<s>othermap = newmap[-1, 0] / newmap[1, 0]</s>
|
|
<s>othermap = newmap[-1, 0] / newmap[1, 0]</s>
|
|
</pre></div>
|
|
</pre></div>
|
|
|
|
+
|
|
<p>Continuation lines must end with a <tt>\</tt> and have <em>no</em> trailing
|
|
<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
|