Focal Statistics
Feature Description
Focal Statistics calculates statistical values for each cell in a raster dataset based on its neighboring cells. The operation uses an expanding window centered on the target raster cell, and performs statistical computations on all grid cells within the specified neighborhood range. Available statistical methods include: Maximum, Minimum, Majority, Minority, etc. Common neighborhood shapes include: Rectangle, Circle, Annulus, and Sector.
The following diagram illustrates focal statistics. The cell in the second row and third column derives its value from all cell values within a 3*3 rectangular neighborhood:
SuperMap Focal Statistics provides 10 statistical modes:
- Minimum: Finds the minimum cell value within the neighborhood.
- Maximum: Finds the maximum cell value within the neighborhood.
- Mean: Calculates the average value of all cells within the neighborhood.
- Standard Deviation: Computes the standard deviation of cell values within the neighborhood.
- Sum: Calculates the sum of all cell values within the neighborhood.
- Variety: Counts the number of distinct cell values within the neighborhood.
- Range: Computes the difference between maximum and minimum values within the neighborhood.
- Majority: Determines the most frequently occurring cell value within the neighborhood.
- Minority: Determines the least frequently occurring cell value within the neighborhood.
- Median: Finds the middle value when all cell values within the neighborhood are sorted in ascending order.
Parameter Description
Parameter | Default Value | Description | Type |
---|---|---|---|
Source Raster Dataset | Input raster dataset | DatasetGrid | |
Target Datasource | Datasource storing the result dataset | Datasource | |
Result Dataset Name | Name of the output dataset | String | |
Neighborhood Type | Rectangle | Specifies neighborhood shape. Four types are supported: Rectangle, Circle, Annulus, and Sector. Additional parameters are required based on shape selection (e.g., width/height for Rectangle, radius/angles for Sector). | NeighbourShapeType |
Neighborhood Unit Type | Cell | Specifies unit type for neighborhood calculation. Supported types: CELL (raster coordinates) and MAP (geographic coordinates). | NeighbourUnitType |
Statistical Method | Minimum | Specifies statistical mode. 10 options available: Minimum, Maximum, Mean, Standard Deviation, Sum, Variety, Range, Majority, Minority, Median. | GridStatisticsMode |
Ignore NoData | false | When enabled, only cells with valid values participate in statistics; otherwise, NoData cells are included. | Boolean |
Inner Radius (Optional) |
0.0 | Inner radius for Annulus neighborhood | Double |
Outer Radius (Optional) |
0.0 | Outer radius for Annulus neighborhood | Double |
Width (Optional) |
0.0 | Column count/width for Rectangle neighborhood | Double |
Height (Optional) |
0.0 | Row count/height for Rectangle neighborhood | Double |
Radius (Optional) |
0.0 | Radius for Circle/Sector neighborhood | Double |
Start Angle (Optional) |
0.0 | Starting angle for Sector neighborhood | Double |
End Angle (Optional) |
0.0 | Ending angle for Sector neighborhood | Double |
Output
Parameter | Description | Type |
---|---|---|
Result Raster Dataset | Output raster dataset | DatasetGrid |