Available with Spatial Analyst license.
Before beginning to perform analysis, it is important to understand the geoprocessing analysis environment within which you are working. The analysis environment includes the workspace into which results will be placed and the extent, cell size, and coordinate system of results.
When running geoprocessing tools, you can specify environment settings via the Environment Settings. You can override the default settings of the environments at various levels. Each tool dialog box has an Environments button that allows application-level settings to be overridden.
The four environment levels form a hierarchy where the application level is highest. In this hierarchy, environment settings are passed down to the next level, as illustrated below. At each level, you can override the passed-down environment settings with another setting.
The one exception to this hierarchy is with models. If you run the model from the ModelBuilder window, the application environment is passed down. If you run the model using its tool dialog box, the tool environment is passed down.
- Learn more about geoprocessing environments
- A quick tour of geoprocessing environments
- Learn more about the hierarchy of Environments
A geodatabase workspace is a container for geographic data. It is a collection of geographic datasets stored in a file system folder or database management system.
There are two workspace environments that you can use to control where inputs are found and outputs are created when using the Spatial Analyst extension.
The Current workspace environment setting specifies the workspace for the current session.
It is the location from which inputs are obtained and outputs are placed when running Spatial Analyst tools.
The Scratch workspace environment specifies where any temporary output datasets the tool generates are placed.
The processing extent
When performing analysis, if the area of interest is a portion of a larger raster dataset, the processing extent can be set to encompass only the desired cells. All subsequent output rasters from analysis will be limited to this extent.
The Output extent environment is used to control where the raster processing occurs in Spatial Analyst tools.
The extent is a rectangle, specified by identifying the coordinates of the window in map space.
The Snap raster environment can be used to ensure that all your raster outputs have the same cell alignment or the same alignment as an existing raster.
The lower left corner of the extent is snapped to a cell corner of the snap raster, and the upper right corner is adjusted using the output cell size. As a result, when the output cell size is the same as the snap raster cell size, the cells in the output raster are aligned with the cells of the snap raster.
The raster analysis environments allow you to control the cell size and cell alignment of the output raster, as well as limiting the analysis to specific locations within the analysis extent.
The Cell size environment controls the resolution of the output raster from Spatial Analyst tools.
The default setting for this environment is Maximum of Inputs, which is the largest (coarsest) cell size of the input raster datasets. If the input to the tool is a feature class, the default cell size is the width or height (whichever is shortest) of the extent of the feature class, divided by 250.
Exercise caution when specifying a cell size finer than that of the input raster datasets. No new data is created; cells are interpolated using nearest neighbor resampling, so the result can only be as precise as the coarsest input.
The Mask environment is used to identify those locations that will be included when performing an operation.
The mask can be a raster or a feature class. All input cells that fall outside the mask are not considered in the analysis and are assigned the NoData value in the result.
Setting the analysis mask is essentially a two-step process.
- Create the mask dataset if you do not already have one. It can be raster or feature (point, line, or polygon) data.
- To create a raster mask, one method would be to use the Reclassify tool, assigning NoData to those cells you want to exclude.
- To create a feature mask, create an empty feature class in ArcCatalog and define the area of interest (the mask) using the ArcMap Editor toolbar.
- Once the dataset has been created, set its mask environment before executing the tool.
With the raster storage environments you can control certain properties of output rasters. Check the help page of a tool for more specific details.
The Compression type environment setting is generally honored for output integer rasters. If the output is floating point, the setting is ignored and the output raster is always uncompressed.
While some formats may otherwise allow for lossy compression, only the Compression Type parameter is supported. The Compression quality parameter is not supported, and essentially is 100, regardless of it being set to any other value.
The Pyramid environment setting is not honored for output rasters. Pyramids are not created for raster output from any Spatial Analyst tool.
With the Calculate Statistics parameter of the Raster Statistics environment setting, you can decide whether or not to have the statistics be generated for an output integer raster. Check the specific documentation for that tool for any exceptions.
Statistics are always generated for output rasters that are floating point, regardless of the setting of this environment.
The Tile Size environment setting is generally supported by Spatial Analyst tools for TIFF and geodatabase outputs.
The default tile size is 128 x 128 cells.