You are here:
Extensions > Spatial Analyst > Spatial Analyst functional reference > Zonal (Spatial Analyst)

# ZonalMinority

Release 9.2

Print all topics in : "Zonal (Spatial Analyst)"

Records, in each output cell, the minority value (the value that appears least often) of all cells in the <value_grid> that belong to the same zone as the output cell. Zones are identified by the values of the cells in the input <zone_grid>.

Illustration

Usage tips

Map Algebra

• The zone and value rasters must be integer.

• The data type of the output raster will be integer.

• When there is a tie for the minority value in a zone, the output for all cell locations in the zone are assigned the lowest of the tied values.

• Learn more about how to specify the input raster dataset in the Map Algebra expression of Raster Calculator.

Command line syntax
See Zonal Statistics

To perform the equivalent to map algebra ZonalMinority, set the statistics type to Minority.

Scripting syntax
See Zonal Statistics

To perform the equivalent to map algebra ZonalMinority, set the statistics type to Minority.

Map Algebra syntax
ZonalMinority(<zone_grid>, <value_grid>, {DATA | NODATA})

 Parameter Explanation An integer raster that identifies the zone for each cell. The zone raster can be an expression resulting in a raster. An integer raster that defines the values of the cells in which the minority value is to be calculated. The minority of the values of the value raster in each zone will be assigned to every cell in that zone on the output raster. The value raster may be an expression resulting in a raster. {DATA | NODATA} A keyword defining the manner in which NoData values on the that fall within a zone defined by the will influence the output result. DATA  — A keyword that specifies that if a NoData value exists in a cell on the value raster within any particular zone defined by , the cell will be ignored, and only cells on the value raster that have data values within the zone will be used to determine the minority for the output. NODATA  — A keyword that signifies that if a NoData value exists on the value raster within any particular zone defined by , there is insufficient information to complete the calculation to determine the minority of the values for all the cells within the zone, and the entire zone will receive the NoData value on the output raster.

### Map Algebra example

```zonalminority(zonegrid, valuegrid)
zonalminority(zonegrid, valuegrid, DATA)
zonalminority(zonegrid, valuegrid, NODATA)
zonalminority(zonegrid, (ingrid1 + ingrid2))
zonalminority((ingrid1 + ingrid2), ingrid3, NODATA)
zonalminority(reclass(ingrid1, table1), (ingrid2 div ingrid3 * 4))```

ArcObjects syntax
See Zonal Statistics

To perform ZonalMinority using ArcObjects, use the IZonalOp::ZonalStatistics method from the RasterZonalOp object specifying esriGeoAnalysisZonalStatsMinority as the esriGeoAnalysisZonalStatisticsEnum.

Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.