Make environment settings for a model |
Spatial Analyst |
Segment 13 of 34 |
Top Previous Next |
Before you start to perform analysis on your data, you should set any relevant environment parameters.
When running tools via the Spatial Analyst toolbar, you’ll set environment settings on the Options dialog box (accessed via the Spatial Analyst toolbar’s context menu). When working with tools via the Spatial Analyst Tools toolbox, you’ll set environment settings via the Environment Settings dialog box. Although they have similar properties, the Spatial Analyst toolbox Options environment settings and the ArcToolbox environment settings do not share information or interact.
There are three levels at which you can set environment settings when working with tools in the Spatial Analyst Tools toolbox. You can specify environment settings for the application that will apply to all tools (right-click the ArcToolbox window and click Environments to access the Environment Settings dialog box). Alternatively, you can set environment settings for a specific model or for a process within a model (right-click the tool element of a process in a model and click Properties to override environment settings for a model or the application). Environment settings for the application are used by default unless they are specified for a model or for a process within a model. Settings for a model will override settings for the application. Settings for a process will override settings for the application and the model to which the process belongs. For more information on environment settings, type “environment settings” in the index of the ArcGIS Desktop Help system.
Because your environment settings apply to each process of this model only, you’ll set environment settings for the model.
To define the environment settings for a model, open its model Properties, and click the Environments tab. You see several expandable categories; each contains several settings. Expand the General Settings tree. Check the settings that you want to specify in your model; in this example, Current Workspace, Extent, and Scratch Workspace. Expand another settings tree (in this case the Raster Analysis Settings) and pick the settings in this category that you want to specify (in this case, cell size).
After you've defined the specific settings that apply to this model, you can set their values. To set their values, click Values. The Environment Settings dialog for this model will list any of the top-level categories from which you chose to add settings.
Expand the General Settings section of the Environment Settings dialog box. In the Current Workspace text box, type the pathname to your project data (in this case, “C:\Spatial”).
In the Scratch Workspace text box, type the pathname to your Results folder—for example, “C:\Spatial\Results”—for its value. The scratch workspace will be the default location for outputs from running tools.
In this example you’ll see how to set the extent for results from running Spatial Analyst tools to be the same as a particular dataset (the elevation data, since this is the approximate boundary of your study area). All results will have the same extent as the elevation dataset.
In this example you'll also see how to set the cell size for output rasters. To do so, expand the Raster Analysis Settings section, click the Cell Size drop-down arrow, and click Same as Layer...a layer name (in this case, “elevation”). In this example elevation dataset has the largest cell size (30 meters). The cell size of this layer will be applied to all subsequent raster outputs.
Note: Setting a smaller cell size than your largest input will not mean you have more detailed information in subsequent raster results; you will just have more cells of the same value, which may affect your display and calculation speeds. Although the software does not prevent it, it is considered incorrect to set a cell size smaller than your largest input cell size.
To save these settings, click OK on the Environment Settings dialog box, click OK on the Model Properties dialog box, click the Model menu, and click Save.
The model’s properties are updated. If at any point you want to close the model and carry on later, right-click the model in the ArcToolbox window and click Edit to continue with the tutorial.