SelectMask |
|
Release 9.3
Last modified September 7, 2011 |
![]() ![]() ![]() Print all topics in : "Extraction (Spatial Analyst)" |
Masks, or sets to NoData, all cell locations in the first input raster that have been assigned NoData in the second input raster on a cell-by-cell basis within the Analysis window.
Illustration
OutRas = SelectMask(InRas1, InRas2)
Usage tips
Map Algebra
If the input raster values are floating point, the output raster will be a floating-point raster. If the input raster values are integer, the output raster will be an integer raster.
The values for cell locations on <grid> are copied to the output raster if these locations are not assigned NoData on the <mask_grid>. Many ArcGIS Spatial Analyst functions, statements, and operators can be used to create the <mask_grid>. Those most commonly used are Select, Test, and Con.
The SelectMask function is similar to setting the Mask in the General tab of the Options dialog box except that the mask in the SelectMask function is only used in the immediate expression, while a mask set in the Options dialog box will be applied to all expressions until this mask is changed.
Learn more about how to specify the input raster dataset in the Map Algebra expression of Raster Calculator.
Command line syntax
See Extract by Mask
Scripting syntax
See Extract by Mask
Map Algebra syntax
SelectMask(<grid>, <mask_grid>)
Parameter | Explanation |
<grid> | An input integer; floating-point raster; or any valid combination of rasters, numbers, operators, and functions that produces an output raster. |
<mask_grid> | An input integer, floating-point raster, or an expression resulting in a raster.
Cells with NoData on the <mask_grid> will be assigned NoData on the output raster. |
selectmask(ingrid1, maskgrid) selectmask(ingrid1, ingrid2 + ingrid3) selectmask(ingrid1, select(ingrid2, 'value > 5')) selectmask(ingrid1, con(ingrid2 < 20, 0, ingrid2)) selectmask(ingrid1 + ingrid2, maskgrid) selectmask(ingrid1, isnull(ingrid2))
ArcObjects syntax
See Raster