Available with Spatial Analyst license.
You can control the analysis performed by Spatial Analyst tools with the Geoprocessing Environments. Having a good understanding of what these environments are and how they apply to tools will help ensure you get the consistent and accurate results from geoprocessing operations. The following resources provide more information on using environments, particularly with their hierarchy and using them in ModelBuilder.
- Learn more about geoprocessing environments
- A quick tour of geoprocessing environments
- Learn more about the hierarchy of Environments
Some environments will be conditionally supported, depending on the input format, the output format, settings made in the parameters for a tool, and particular behaviors for that tool.
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 ArcGIS 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 that 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 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. There are also some format dependencies, so check the help page of any particular tool you are using for more specific details.
There are three primary things that influence which Raster Storage environments are supported when a tool is executed:
- Raster format
Generally, there is a difference between which raster storage environments are supported when the output is an Esri Grid versus the other supported raster formats, such as File geodatabase or TIFF rasters.
- Data type
Whether an output is integer or floating point can determine whether a particular raster storage envioronment is supported or not.
- Parameter settings
Certain tools have a parameter that can determine the type of the output raster.
For certain tools the type of the output is determined by the types of all of the inputs. For example, if the tool takes several input rasters, and all of them are integer save for one that is floating point, the output raster would be floating point. When the output is floating point, fewer of the raster storage environments may be supported.
Each tool reference has an Environments section near the bottom of the page. All of the environments that can be supported by the tool will be listed here. Note that this list is inclusive of all outputs from a tool, including the optional ones. For example, consider the Cost Distance tool, whose primary output is a floating-point raster. While floating-point rasters do not support the Compression environment setting, there is an optional output backlink raster, which is integer. Since integer rasters for certain formats can support Compression, this enviorment will be present in the supported environments list. This is an important detail to understand when assessing these environments.
The following sections provide more details on each of the Raster Storage environments.
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 to not 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 the following output formats: TIFF, file geodatabase, or an SDE geodatabase.
The default tile size is 128 x 128 cells.
Certain tools support parallel processing for improved performance. The following environment gives you some control over how those resources are allocated.
Parallel Processing Factor
Set the desired value for the Parallel Processing Factor.
There is one tool that supports the Qualified Field Names environment, that being Extract Multi Values to Points.
Certain spatial analyst tools can create feature data as output and as a result may support the following types of environments when the output is to a geodatabase:
- XY Resolution: XY Resolution, XY Tolerance
- M Values: M Resolution, M Tolerance, Output has M Values
- Z Values: Default Output Z Value, Output has Z Values, Z Resolution, Z Tolerance
See the appropriate setctions for more details on those environment categories.
When output is to a geodatabase, the following environment environments are supported:
When output is a feature class in a geodatabase, the following environments are generally supported: