|
@@ -3,24 +3,26 @@
|
|
<em><b>r.mask</b></em> - Facilitates creation of a raster "MASK" map to
|
|
<em><b>r.mask</b></em> - Facilitates creation of a raster "MASK" map to
|
|
control raster operations.
|
|
control raster operations.
|
|
|
|
|
|
-<p>The MASK is only applied when <em>reading</em> an existing GRASS raster map,
|
|
|
|
|
|
+<p>
|
|
|
|
+The MASK is only applied when <em>reading</em> an existing GRASS raster map,
|
|
for example when used in a module as an input map.
|
|
for example when used in a module as an input map.
|
|
|
|
|
|
The MASK will block out certain areas of a raster map from analysis and/or
|
|
The MASK will block out certain areas of a raster map from analysis and/or
|
|
display, by "hiding" them from sight of other GRASS modules. Data falling
|
|
display, by "hiding" them from sight of other GRASS modules. Data falling
|
|
within the bounaries of the MASK can be modified and operated upon by other
|
|
within the bounaries of the MASK can be modified and operated upon by other
|
|
GRASS raster modules; data falling outside the MASK is treated as if it were NULL.
|
|
GRASS raster modules; data falling outside the MASK is treated as if it were NULL.
|
|
-<p>Because the MASK is actually only a reclass map named "MASK", it can be
|
|
|
|
|
|
+<p>
|
|
|
|
+Because the MASK is actually only a reclass map named "MASK", it can be
|
|
copied, renamed, removed, and used in analyses, just like other GRASS
|
|
copied, renamed, removed, and used in analyses, just like other GRASS
|
|
raster map layers. The user should be aware that a MASK remains in
|
|
raster map layers. The user should be aware that a MASK remains in
|
|
place until a user renames it to something other than "MASK", or removes
|
|
place until a user renames it to something other than "MASK", or removes
|
|
it using "<tt>r.mask -r</tt>" or <em>g.remove</em>.
|
|
it using "<tt>r.mask -r</tt>" or <em>g.remove</em>.
|
|
-
|
|
|
|
-<p>Grid cells in the MASK map containing <tt>0</tt> or <tt>NULL</tt>
|
|
|
|
|
|
+<p>
|
|
|
|
+Grid cells in the MASK map containing <tt>0</tt> or <tt>NULL</tt>
|
|
will replace data with NULL, while cells containing other values will allow
|
|
will replace data with NULL, while cells containing other values will allow
|
|
data to pass through unaltered.
|
|
data to pass through unaltered.
|
|
-
|
|
|
|
-<p>To restore raster operations to normal (i.e., all cells of the current region),
|
|
|
|
|
|
+<p>
|
|
|
|
+To restore raster operations to normal (i.e., all cells of the current region),
|
|
remove the MASK file by setting the <b>-r</b> remove MASK flag. In this case, a
|
|
remove the MASK file by setting the <b>-r</b> remove MASK flag. In this case, a
|
|
dummy value must also be given for the input parameter.
|
|
dummy value must also be given for the input parameter.
|
|
A MASK also can be removed by using <em>g.remove</em>
|
|
A MASK also can be removed by using <em>g.remove</em>
|
|
@@ -34,13 +36,13 @@ counterintuitive. Areas inside the MASK are not hidden;
|
|
areas outside the MASK will be ignored until the MASK file
|
|
areas outside the MASK will be ignored until the MASK file
|
|
is removed.
|
|
is removed.
|
|
<p>
|
|
<p>
|
|
-The mask is read as an integer map. If MASK is actually a
|
|
|
|
|
|
+The MASK is read as an integer map. If MASK is actually a
|
|
floating-point map, the values will be converted to integers using the
|
|
floating-point map, the values will be converted to integers using the
|
|
map's quantisation rules (this defaults to round-to-nearest, but can
|
|
map's quantisation rules (this defaults to round-to-nearest, but can
|
|
be changed with r.quant).
|
|
be changed with r.quant).
|
|
<p>
|
|
<p>
|
|
<em>r.mask</em> uses <em>r.reclass</em> to create a reclassification of an
|
|
<em>r.mask</em> uses <em>r.reclass</em> to create a reclassification of an
|
|
-existing raster map and name it MASK. A reclass map takes up less space, but
|
|
|
|
|
|
+existing raster map and name it <tt>MASK</tt>. A reclass map takes up less space, but
|
|
is affected by any changes to the underlying map from which it was created.
|
|
is affected by any changes to the underlying map from which it was created.
|
|
The user can select category values from the input raster to use in the MASK
|
|
The user can select category values from the input raster to use in the MASK
|
|
with the <em>maskcats</em> parameter; if <em>r.mask</em> is run from the
|
|
with the <em>maskcats</em> parameter; if <em>r.mask</em> is run from the
|
|
@@ -51,6 +53,7 @@ Somewhat similar program functions to those performed by
|
|
<em>r.mask</em> can be done using <em>r.mapcalc</em>,
|
|
<em>r.mask</em> can be done using <em>r.mapcalc</em>,
|
|
<em>g.region</em>, and other commands.
|
|
<em>g.region</em>, and other commands.
|
|
|
|
|
|
|
|
+
|
|
<h2>EXAMPLES</h2>
|
|
<h2>EXAMPLES</h2>
|
|
|
|
|
|
Creating a raster mask, for showing only elevations of lakes:
|
|
Creating a raster mask, for showing only elevations of lakes:
|
|
@@ -77,6 +80,7 @@ d.erase
|
|
d.rast geology_30m
|
|
d.rast geology_30m
|
|
</pre></div>
|
|
</pre></div>
|
|
|
|
|
|
|
|
+
|
|
<h2>SEE ALSO</h2>
|
|
<h2>SEE ALSO</h2>
|
|
<em>
|
|
<em>
|
|
<a href="g.region.html">g.region</a>,
|
|
<a href="g.region.html">g.region</a>,
|
|
@@ -86,8 +90,10 @@ d.rast geology_30m
|
|
<a href="g.rename.html">g.rename</a>
|
|
<a href="g.rename.html">g.rename</a>
|
|
</em>
|
|
</em>
|
|
|
|
|
|
|
|
+
|
|
<h2>AUTHOR</h2>
|
|
<h2>AUTHOR</h2>
|
|
|
|
|
|
Michael Barton, Arizona State University
|
|
Michael Barton, Arizona State University
|
|
|
|
|
|
-<p><i>Last changed: $Date$</i>
|
|
|
|
|
|
+<p>
|
|
|
|
+<i>Last changed: $Date$</i>
|