Problem: The Raster Math toolset returns incorrect results
The Math toolset is provided with the Spatial Analyst Toolbox and contains tools such as Minus, Divide, and Plus to perform mathematical operations on raster datasets. In some instances, running one of the Math tools on a raster dataset returns incorrect results. For example, when running the Minus tool to subtract the values of one raster from another raster, the returned results are incorrect.
This issue occurs because the rasters used as input in the Raster Math toolset have different cell sizes. To check the cell size of a raster, right-click the raster in Table Of Contents and open Properties. Then click the Source tab to view the Raster Information section where the Cell Size is shown.
Solution or Workaround
To resolve this issue, match the cell size of the raster datasets using the Resample tool before performing any mathematical operation.
- In ArcMap, navigate to Data Management Tools > Raster > Raster Processing > Resample.
- In the Resample dialog box, select the raster with the larger cell size as the Input Raster.
- Set a name and location for the Output Raster Dataset.
- Select 'Same as layer <raster with smaller cell size>' for the Output Cell Size.
- Set the Snap Raster parameter to adjust the extent of the output raster to match the cell alignment of the raster with a smaller cell size.
- In the Resample dialog box, click Environments to open the Environment Settings dialog box.
- Click Processing Extent.
- In the Snap Raster parameter, select the raster with the smaller cell size, and click OK.
- Click OK to execute the Resample tool.
Note: When running the Raster Math toolset, ensure the projection of the input rasters are the same. If necessary, use the Project Raster tool from the Data Management toolbox to change the projection of the rasters.
- ArcMap: Cell size of raster data
- ArcMap: Cell size and resampling in analysis
- ArcMap: Snap Raster (Environment setting)
- ArcMap: General properties
- ArcMap: An overview of the Raster Math toolset
- How To: Find raster value differences between two rasters in ArcMap
Last Published: 11/15/2018
Article ID: 000019042
Software: ArcMap 10.6.1, 10.6