Handling projections during analysis in Spatial Analyst
Inputs to a Spatial Analyst tool that are in the same coordinate system (same projection and datum) will be used directly. If the inputs have different projections, they may be projected to temporary intermediate datasets before the selected tool operates on them. As a result, the coordinate system of the output will be dependent on the coordinate system of the input datasets.
The default behavior
The default behavior determining the coordinate system of the output is described in the following table. When any particular input dataset is in a different projection from that of the output, it will first be projected to that projection.
Input type | Condition | Output coordinate system |
---|---|---|
Raster only |
If only one raster dataset is input: |
The output will be in that same coordinate system. |
If more than one raster dataset is input, and all are in the same coordinate system: |
The output will be in that same coordinate system. |
|
If more than one raster dataset is input, and they are in different coordinate systems: |
The output will be in the same coordinate system as the first defined input. |
|
Feature only |
If the only input is feature data: |
The output will be in that same coordinate system. |
Both raster and feature |
If the raster and feature inputs are all in the same coordinate system: |
The output will be in that same coordinate system. |
If the raster and feature inputs are in different coordinate systems: |
The output will be in the same coordinate system as the first raster input. |
Overriding the default
To override the default behavior for coordinate systems, set the coordinate system via Environment Settings before executing the tool. You can set the coordinate system of all output raster datasets to be Same as Input, As Specified Below, Same as Display, or Same as Layer.
Automatically transforming a raster dataset into the common coordinate system in the cases identified above is referred to as projecting on the fly. The transformation method used when projecting rasters on the fly is a piecewise polynomial transformation, where the data is transformed block by block, thereby guaranteeing high accuracy.
When performing repeated operations on a raster dataset that would otherwise be projected on the fly, it is recommended that you project the raster directly before performing the analysis. It will be significantly more efficient to only have to project the raster one time instead of each time the operation is executed. You will also have more control over the parameters used when projecting. Use the Project Raster tool to project rasters into a different coordinate system permanently.