NAME

r.mask - Establishes or removes the current working mask.
(GRASS Raster Program)

SYNOPSIS

r.mask

DESCRIPTION

The r.mask program allows the user to block out certain areas of a map from analysis, by "hiding" them from sight of other GRASS programs. This is done by establishing a mask. While a mask exists, most GRASS programs will operate only on data falling inside the masked area, and ignore any data falling outside of the mask.

Because the mask is actually only a reclass file called "MASK" that is created when the user identifies a mask using r.mask, it can be copied, renamed, removed, and used in analyses, just like other GRASS 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 it using r.mask or g.remove.

r.mask provides the following options:

	 1 Remove the current mask 
	 2 Identify a new mask 
	RETURN Exit from program 
The user establishes a new mask by choosing option (2). The user will be asked to name an existing raster map layer from among those available in the current mapset search path. Once done, the user is shown a listing of this map's categories, and is asked to assign a value of "1" or "0" to each map category. Areas assigned category value "1" will become part of the mask's surface, while areas assigned category value "0" will become "no data" areas in the MASK file.

If a category is not assigned category value "1" it will automatically be assigned the category value "0" in the resulting MASK file. Any cells falling in category "0" will fall outside the newly formed mask, and their presence will be ignored by GRASS programs run later on, as long as the MASK file remains in place.

NOTES

The above method for specifying a "mask" may seem counterintuitive. Areas inside the mask are not hidden; areas outside the mask will be ignored until the MASK file is removed.

This program actually creates a raster map layer (reclass type) called MASK, which can be manipulated (renamed, removed, copied, etc.) like any other raster map layer.

Somewhat similar program functions to those performed by r.mask can be done using r.mapcalc, g.region, and other programs.

This program can only be run interactively.

Note that some programs, like r.stats, have options that allow the user to see the effects of the current mask without removing the current mask. See, for example, use of the -m option for r.stats.

SEE ALSO

g.copy
g.region
g.remove
g.rename
r.combine
r.infer
r.mapcalc
r.reclass
r.stats
r.weight

AUTHOR

Michael Shapiro, U.S. Army Construction Engineering Research Laboratory