|
|
Mask
vs. window
Concepts:
analysis mask
analysis window
analysis extent
raster processing
Two settings available in the Spatial
Analyst Options are the analysis mask
and analysis window, known in
Spatial Analyst as the analysis
extent. Both are ways of limiting how much area is analyzed in
any Spatial Analyst operation.
The analysis extent is always a rectangle and it is the absolute area
to be analyzed. Any pixels outside the window are ignored and
will not be represented in the raster
processing.
Raster
processing is
how these types of analyses are run - typically an input raster has
something done to it, resulting in an output raster.
The
analysis mask can
be any ArcMap layer, shapefile, coverage, raster, etc, and can be an
irregular shape. Any pixels outside the mask are not computed in
the
Spatial Analyst operation (instead being assigned a value of
NODATA).
A watershed polygon is a commonly-used analysis mask.

Examples of raster processing,
extent masks, and extent windows. Left is the full State
landcover layer. Second is just a zoomed-in area showing the
watershed of interest. Third is the output of raster processing
using an analysis extent - note that pixels outside the rectangular
area are not computed, but those outside the watershed (but within its
rectangular extent) are. Fourth is the output of raster
processing using an analysis extent and an analysis mask - processing
is limited to the rectangular extent of the watershed, and furthermore
cells outside that watershed are computed as NODATA.
Setting the mask is easy enough to do - it's right
below the working directory in the Options
dialog. Just choose the layer you want for the mask from the
list, or click the 'Browse' button to choose one.
Setting the extent is equally easy, it's in the Options dialog, but on
its own tab. Just select the extent layer from the drop-down, and
then "snap" to the raster you want to analyze.

Bugs
One bug involved in analysis masks and extents is that if you create a
layer from a selected set (for example, a watershed selected), and use
that selected layer as a mask or extent, Spatial Analyst will still use
the entire watershed layer (i.e. the entire state) for analysis.
To work around this, you must export the selected polygons as a
separate shapefile and use that as the mask or extent.
Another bug involves projections. Although you can see data from
different projections together in ArcMap (they are reprojected
on-the-fly), this is ignored in raster processing. If you have a
watershed in UTM coordinates and a raster in something else (like NLCD,
which is Albers), and use the watershed as a mask or extent, the UTM
watershed will likely not line up with the Albers raster, and you will
get an output of NODATA or zeroes. The workaround here is that
you have to reproject either the mask/extent polygon to the raster, or
vice-versa. Typically the polygons are much easier to reproject.
|