Cell Statistics function

Overview

This function calculates a statistic from multiple rasters, on a pixel-by-pixel basis. The available statistics are majority, maximum, mean, median, minimum, minority, percentile, range, standard deviation, sum, and variety.

Notes

The order of the input rasters is irrelevant for this raster function.

For the Maximum, Minimum, Mean, Median, Majority, Minority, Percentile, and Sum statistic types, if a single raster is used as the input, the output cell values will be the same as the input cell values. For Range and Standard deviation, the output cell values will all be 0. For Variety, it will be 1.

For each Operation, you can also choose to calculate the statistics by excluding all the NoData pixels.

To treat all bands from multiband inputs equally, uncheck the Process as multiband check box. This means any multiband rasters will be converted into multiple single-band rasters. The tool will then operate across all of the input bands, and return the result of the statistic being calculated on them as a single-band output raster. To process a selection of bands from a multiband raster, first create a raster dataset composed of those particular bands with the Composite Bands raster function, and then use it as input to the function.

Cell Statistics creates a single-band output when not processing as multiband.
Cell Statistics creates a single-band output when Process as multiband is unchecked.

To calculate multiband output statistics from multiband input rasters, check the Process as multiband parameter. In this case, each multiband input will be used to calculate band-wise statistics. This means the statistic will be calculated for the first band across all the inputs, then the second band across all the inputs, and so on. The results from each band will be used to create a multiband output. In this case, all inputs must have an equal number of bands. If some of your intended inputs have fewer bands than others, you will need to create new NoData bands to get an equal number of bands for all inputs. You can do this by using the Composite Bands raster function to create multiband datasets, combining the existing bands with NoData values for the missing bands. You can then use the resulting multiband rasters as inputs to the function.

Cell Statistics creates a multiband output when processing as multiband.
Cell Statistics creates a multiband output when Process as multiband is checked.

If all inputs are multidimensional rasters with the same number of variables, the function will perform the operation for all slices with the same dimension value, and the output will be a multidimensional raster. The variables in the inputs must have the same dimensions or common dimensions.

If one or more of the inputs is a multidimensional raster and the other input is a constant, the function will perform the operation for all slices for all variables against the constant value, and the output will be a multidimensional raster.

For Majority and Minority calculations, when there is a tie, the output is the lowest of the tied values.

Parameters

Parameter nameDescription

Rasters

(Required)

A list of input rasters for which a statistical operation will be calculated for each cell.

Operation

Specifies the statistical operation for calculation.

The available statistics are Majority, Maximum, Mean, Median, Minimum, Minority, Percentile, Range, Standard Deviation, Sum, and Variety.

The default is Mean.

Percentile Value

The percentile to calculate. The default is 90, for the 90th percentile.

The values can range from 0 to 100. The 0th percentile is essentially equivalent to the minimum statistic, and the 100th percentile is equivalent to maximum. A value of 50 will produce essentially the same result as the median statistic.

This option is only available if the Operation parameter is set to Percentile.

Percentile Interpolation Type

Specifies the method of interpolation to be used when the specified percentile value lies between two input cell values.

  • Auto-detect—If the input rasters are of integer pixel type, the Nearest method is used. If the input raster is of floating point pixel type, the Linear method is used. This is the default.
  • Nearest—The nearest available value to the desired percentile is used. In this case, the output pixel type is the same as that of the input value rasters.
  • Linear—The weighted average of the two surrounding values from the desired percentile is used. In this case, the output pixel type is floating point.

This option is only available if the Operation type parameter is set to Median or Percentile.

Process as multiband

Specifies how the input rasters bands are processed.

  • Unchecked—Each band from a multiband raster input will be processed separately as a single-band raster. This is the default.
  • Checked—Each multiband raster input will be processed as a multiband raster. The operation will be performed for each band from one input using the corresponding band number from the other inputs.

Cellsize Type

Choose which cell size to use in the output raster. If all the input cell sizes are the same, all the options will yield the same results.

  • First Of—Use the first cell size of the input rasters.
  • Min Of—Use the smallest cell size of all the input rasters.
  • Max Of—Use the largest cell size of all the input rasters. This is the default.
  • Mean Of—Use the mean cell size of all the input rasters.
  • Last Of—Use the last cell size of the input rasters.

Extent Type

Choose which extent should be used in the output raster:

  • First Of—Use the extent of the first input raster to determine the processing extent.

  • Intersection Of—Use the extent of the overlapping pixels to determine the processing extent. This is the default.
  • Union Of—Use the extent of all the rasters to determine the processing extent.
  • Last Of—Use the extent of the last input raster to determine the processing extent.

Operations

A list of all of the operations and a description for each is provided below. For more information about each of the operations, see the How Cell Statistics works topic.

Parameter nameDescription

Majority

Determines the value that occurs most often on a pixel-by-pixel basis.

Maximum

Determines the largest value on a pixel-by-pixel basis.

Mean

Calculates the average on a pixel-by-pixel basis.

Median

Calculates the middle value of the pixels on a pixel-by-pixel basis.

Minimum

Determines the smallest value on a pixel-by-pixel basis.

Minority

Determines the value that occurs least often on a pixel-by-pixel basis.

Percentile

Calculates the percentile of the inputs. The 90th percentile is calculated by default. You can specify other values (from 0 to 100) using the Percentile value parameter.

Range

Calculates the difference between the largest and the smallest value on a pixel-by-pixel basis.

Standard Deviation

Calculates the standard deviation of the pixels on a pixel-by-pixel basis.

Sum

Calculates the total value on a pixel-by-pixel basis.

Variety

Calculates the number of unique values on a pixel-by-pixel basis.

Majority (Ignore NoData)

Determines the value that occurs most often on a pixel-by-pixel basis.

Only cells that have data values will be used in determining the statistic value. If a NoData value exists at a certain location, the NoData value will be ignored.

Maximum (Ignore NoData)

Determines the largest value on a pixel-by-pixel basis.

Only cells that have data values will be used in determining the statistic value. If a NoData value exists at a certain location, the NoData value will be ignored.

Mean (Ignore NoData)

Calculates the average on a pixel-by-pixel basis.

Only cells that have data values will be used in determining the statistic value. If a NoData value exists at a certain location, the NoData value will be ignored.

Median (Ignore NoData)

Calculates the middle value of the pixels on a pixel-by-pixel basis.

Only cells that have data values will be used in determining the statistic value. If a NoData value exists at a certain location, the NoData value will be ignored.

Minimum (Ignore NoData)

Determines the smallest value on a pixel-by-pixel basis.

Only cells that have data values will be used in determining the statistic value. If a NoData value exists at a certain location, the NoData value will be ignored.

Minority (Ignore NoData)

Determines the value that occurs least often on a pixel-by-pixel basis.

Only cells that have data values will be used in determining the statistic value. If a NoData value exists at a certain location, the NoData value will be ignored.

Percentile (Ignore NoData)

Calculates the percentile of the inputs. The 90th percentile is calculated by default. You can specify other values (from 0 to 100) using the Percentile value parameter.

Only cells that have data values will be used in determining the statistic value. If a NoData value exists at a certain location, the NoData value will be ignored.

Range (Ignore NoData)

Calculates the difference between the largest and the smallest value on a pixel-by-pixel basis.

Only cells that have data values will be used in determining the statistic value. If a NoData value exists at a certain location, the NoData value will be ignored.

Standard Deviation (Ignore NoData)

Calculates the standard deviation of the pixels on a pixel-by-pixel basis.

Only cells that have data values will be used in determining the statistic value. If a NoData value exists at a certain location, the NoData value will be ignored.

Sum (Ignore NoData)

Calculates the total value on a pixel-by-pixel basis.

Only cells that have data values will be used in determining the statistic value. If a NoData value exists at a certain location, the NoData value will be ignored.

Variety (Ignore NoData)

Calculates the number of unique values on a pixel-by-pixel basis.

Only cells that have data values will be used in determining the statistic value. If a NoData value exists at a certain location, the NoData value will be ignored.