Cell Alignment (Environment setting)

Tools that honor the Cell Alignment environment will adjust the cell alignment of the output to match the cell alignment of the specified processing extent.

Usage notes

  • If an extent is specified in the Snap Raster environment, it will override the extent specified in the Cell Alignment environment.
  • The Align with Input option preserves the cell alignment of the input and does not resample the data.
  • The Align with Processing Extent option will resample the input raster using the resampling method specified in the environment setting.

Dialog syntax

  • Default—The cell alignment will follow the default behavior of the tool. This is the default.
  • Align with Processing Extent—The extent of the output cells will be adjusted to match the cell alignment of the specified processing extent.
  • Align with Input—The output cells will follow the alignment of the input.

Scripting syntax

arcpy.env.cellAlignment = cellAlignment_option

cellAlignment_optionExplanation

DEFAULT

The cell alignment will follow the default behavior of the tool. This is the default.

ALIGN_WITH_PROCESSING_EXTENT

The extent of the output cells will be adjusted to match the cell alignment of the specified processing extent.

ALIGN_WITH_INPUT

The output cells will follow the alignment of the input.

cellAlignment syntax

Script example

import arcpy

# Set the cell alignment environment using a keyword.
arcpy.env.cellAlignment = "ALIGN_WITH_PROCESSING_EXTENT"