Knowledge Base - Technical Articles

Technical Article   Problem:  Pixels are shifting after clipping a raster using extract by mask

Article ID: 34448
Bug Id: N/A
Software:  ArcGIS - ArcEditor 9.0, 9.1, 9.2, 9.3, 9.3.1, 10 ArcGIS - ArcInfo 9.0, 9.1, 9.2, 9.3, 9.3.1 ArcGIS - ArcView 9.0, 9.1, 9.2, 9.3, 9.3.1
Platforms: N/A


When running the Extract By Mask tool from the Spatial Analyst Toolbox, the output raster is shifted from the original.


The extent used to specify the output raster is based on the feature class being used to 'clip' the data. This results in a slight misalignment of the output raster, when compared to the input raster.

Solution or Workaround

Use the Environment Settings for the Extract By Mask tool to set the extent of the output.

To set the Extent:

i) Open the Environment Settings by clicking on the Environments button on the tool.
ii) Click on General Settings.
iii) Under the Extent heading, select the input raster as the output extent. This populates the Extent parameter.
-show me-


Another option is to specify the extent using the feature class that is clipping the raster, and then specify the Snap Raster using the input raster in the dialog box below.
-show me-


iv) Click OK to exit the Environment Settings dialog box and then click OK to run the tool.

    Created: 2/13/2008
    Last Modified: 5/3/2011

    Article Rating: (1)
    If you would like to post a comment, please login


    By Anonymous - 07/08/2008 8:00 PM

    Other - See details below.

    this article was useful for resolving the issues when performing in arctoolbox but inside a python script it ignores the gp.OutputMFlag function and still shifts the cells regardless, the scripting alternative to this would also have been useful...