The tool evaluates the number of occurrences of the input raster values for each location and ranks them on an ordinal scale—that is, the most popular, second most popular, and so on. It will return the value of the specified nth most popular value defined by the popularity raster value.
In the list of input rasters, the order is irrelevant. However, the raster that defines the popularity position must precede these.
An arbitrary number of rasters can be specified in the input rasters list.
If the input values are the same for any cell location, regardless of the specified popularity, the output value will be the same as the input for that cell location.
If a cell location contains NoData on any of the input rasters, that location will be assigned NoData on the output.
If there is no single value found to be the nth most popular, NoData will be assigned to the location on the output raster. This situation occurs when all input raster values at a location are different or when two or more input raster values have the same number of occurrences and that number is the nth most popular. Returning one of the input raster values, such as the first one encountered in the scan process, would be deceptive. You would not know whether the value is truly the nth most popular value.
If the popularity value is greater than the number of input rasters, each cell location in the output will be assigned NoData.
If 0 is specified as the popularity value, the output value will be NoData.
A popularity level of 1 is the majority value, similar to the Majority option of the Cell Statistics tool.
If any of the input rasters are floating point, the output is floating point; otherwise, it is integer.
If the Process as multiband parameter is unchecked (process_as_multiband is set to SINGLE_BAND in Python), only the first band of a multiband Input popularity raster or constant value (in_popularity_raster_or_constant in Python) will be used. Each band from a multiband Input rasters (in_rasters in Python) will be processed separately as a single-band raster.
If the Process as multiband parameter is checked (process_as_multiband is set to MULTI_BAND in Python), each multiband raster input will be processed as a multiband raster.
The number of bands in the output depends on the Input popularity raster or constant value. If the popularity raster is a single band, the number of bands on the output raster will be the same as the maximum number of bands of all multiband rasters from the input rasters. If the popularity raster is a multiband, the output raster will have the same number of bands as the popularity raster.
If any of the Input rasters is a raster with a smaller number of bands than the output raster, the missing bands will be interpreted as a band filled with NoData. If the cell value of the popularity raster picks value one from the missing band, the output raster will receive NoData. If any of the input rasters is a constant, it will be interpreted as a multiband raster in which the cell values of all bands are the same as the constant and have the same number of bands as the output raster.
If all inputs are multidimensional raster data with the same number of variables, the tool will perform the operation for all slices with the same dimension value. The output will be a multidimensional raster in CRF format. The variables in the inputs must have at least one common dimension and one common dimensional value for this tool to process, otherwise an error will occur.
If all of the inputs have one variable but different names, uncheck the Match Multidimensional Variable geoprocessing environment (set arcpy.env.matchMultidimensionalVariable = False in Python) before performing the operation.
If one or more of the inputs are multidimensional rasters and the other inputs are constant, the tool will perform the operation for all slices for all variables using the constant value, and the output will be a multidimensional raster.
See Analysis environments and Spatial Analyst for additional details on the geoprocessing environments that apply to this tool.