ZonalMedian |
|
Release 9.2
Last modified January 3, 2008 |
Print all topics in : "Zonal (Spatial Analyst)" |
Records, in each output cell, the median values 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.
To calculate the median, all the cells in a zone are ranked. If there are <n> cells in the zone and n is odd, the middle (n/2) value is written to each cell in the zone. If there are an even number of cells, the (n/2) – 1 value is output.
Learn more about how to specify the input raster dataset in the Map Algebra expression of Raster Calculator.
Command line syntax
See Zonal Statistics
Scripting syntax
See Zonal Statistics
Map Algebra syntax
ZonalMedian(<zone_grid>, <value_grid>, {DATA | NODATA})
Parameter | Explanation |
<zone_grid> | An integer raster that identifies the zone for each cell.
The zone raster can be an expression resulting in a raster. |
<value_grid> | An integer raster that defines the values of the cells in which the median is to be calculated.
The median 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 <value_grid> that fall within a zone defined by the <zone_grid> will influence the output results.
|
zonalmedian(zonegrid, valuegrid) zonalmedian(zonegrid, valuegrid, DATA) zonalmedian(zonegrid, valuegrid, NODATA) zonalmedian(zonegrid, (ingrid1 + ingrid2)) zonalmedian((ingrid1 + ingrid2), ingrid3, NODATA) zonalmedian(reclass(ingrid1,tab1), int(ingrid2 div ingrid3 * 4))
ArcObjects syntax
See Zonal Statistics