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.
To run a mathematical operation on the raster datasets using the Raster Math toolset, use the resampled datasets with the same cell size as the input.
- 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.