Skip to main content

Cell Size (Environment setting)

Tools that honor the Cell Size environment set the output raster cell size, or resolution, for the operation. The default output resolution is determined by the coarsest of the input raster datasets, unless determined by the tool.

Usage notes

  • To use a specific numeric cell size, type the numeric value directly in the text box.

  • The default cell size when a feature dataset is used as the only input to a tool is the width or height (whichever is shorter) of the extent of the feature dataset, divided by 250.

  • If a numeric cell size value is specified, it will not be projected if the output is in a spatial reference other than that of the input data. In other cases, the input dataset will be projected, and the new cell size will be used.

  • Use caution when specifying a cell size finer than the input raster datasets. No new data is created; cells are interpolated using nearest neighbor resampling. The result is only as precise as the coarsest input.

  • When datasets are projected during analysis, the output raster cell size will use the method specified in the Cell Size Projection Method environment setting if the tool honors this environment.

Dialog syntax

  • Empty—A geoprocessing tool interprets no value as the preferred setting. This is the default.

  • Maximum of Inputs—Use the largest cell size of all input datasets.

  • Minimum of Inputs—Use the smallest cell size of all input datasets.

  • Same as Layer <name>—Use the cell size of the specified layer or raster dataset.

Python syntax

arcpy.env.cellSize = cellsize_option

Name Explanation

cellsize_option

Specifies the cell size that will be used.

  • Number—Use the specified cell size value directly.

  • Layer name—Use the cell size of the specified layer or raster dataset.

  • MAXOFUse the largest cell size of all input datasets. This is the default, unless the cell size will be determined by the tool.

  • MINOFUse the smallest cell size of all input datasets.

Scripting syntax

import arcpy

# Set the cell size environment using a keyword.
arcpy.env.cellSize = "MINOF"

# Set the cell size environment using a number.
arcpy.env.cellSize = 20

# Set the cell size environment using a raster dataset.
arcpy.env.cellSize = "C:/sapyexamples/data/myraster"