-
Notifications
You must be signed in to change notification settings - Fork 3
Raster Tools Block Statistics
This tool Partitions the input into non-overlapping blocks and calculates the statistic of the values within each block. The value is assigned to all of the cells in each block in the output. This is illustrated in the Figure below. If the data type of the input raster is floating point then only a subset of the statistics will be available (MEAN, MAXIMUM, MINIMUM, RANGE, STD and SUM. For more detailed help see ESRI Help for the ‘Block Statistics (Spatial Analyst)’ tool.
Illustration of how Block Statistics works
Table for Rasters: This is the input table, usually the results table generated by the Geodata > Search tool, but it can be any table with a field containing the full path to the rasters you want to clip. If the Input Table is a DBF, or a table in an ESRI File Geodatabase, then you can select a subset of rows in ArcMap and only those rows will be processed by the tool.
Field for Raster: Select the field from the 'Table for Rasters' that contains the full path to the raster items you want to calculate block statistics for.
Neighborhood: The Neighborhood class dictates the shape of the area around each cell used to calculate the statistic. The different types of neighborhood available are NbrAnnulus, NbrCircle, NbrRectangle, NbrWedge, NbrIrregular, and NbrWeight. The following are the forms of the neighborhoods:
- NbrAnnulus({innerRadius}, {outerRadius}, {CELL | MAP})
- NbrCircle({radius}, {CELL | MAP}
- NbrRectangle({width}, {height}, {CELL | MAP})
- NbrWedge({radius}, {start_angle}, {end_angle}, {CELL | MAP})
- NbrIrregular(kernel_file)
- NbrWeight(kernel_file)
The {CELL | MAP} parameter defines the distance units as either being Cell units or Map units. The default neighborhood is a square NbrRectangle with a width and height of 3 cells.
Neighborhood Settings: Defines the dimensions of neighbourhood class selected.
Format for output rasters: Raster format for output geodata. You can choose from: Esri Grid, img (ERDAS IMAGINE) or tif (GeoTIFF). If you select a file geodatabase for the Result Workspace then the output format will default to ‘Esri Grid’.When storing your raster geodata to a JPEG file, a JPEG 2000 file, a TIFF file, or a geodatabase, you can specify a compression type and compression quality within the ‘Environment Settings’. Select from:
- Esri Grid
- tif (GeoTiff file)
- img (Image file)
Output Workspace: This is the location for the Grid Garage results table containing the list of geodata processed by the tool as well as any data outputs. If the tool encounters any errors when processing the input geodata then a second results table will be generated, with a ‘_FAIL’ suffix, listing the input geodata that failed and any ESRI error messages.
If you have set the ArcGIS ‘Workspace' parameter in the 'Geoprocessing > Environment' Settings then this path will be used as the default. You can use this default path or click the folder button to select a new output location which can be a folder or File Geodatabase. If you specify a folder then the Results Table will be written to a comma-delimited (CSV) text file, if you specify a File Geodatabase it will be written as a Geodatabase Table.
Result Table Name: You can choose to use the default table name or specify a different name for the Grid Garage results table. The Grid Garage results table reports on a range of different properties for each of the geodata items in the 'Table for Geodata' input table. See the Grid Garage User Manual for a description of all the properties reported on.
If the tool encounters any errors when processing any of the geodata then a second results table will be generated, with a ‘_FAIL’ suffix, listing the input geodata that failed and any ESRI error messages. If you choose a folder for the Output Workspace then the result table will be written to a comma-delimited (CSV) text file which will not allow you to select rows for processing when using the table as input for other Grid Garage Tools.
Results Table file name: Each time this tool is run the results table file is given the name ‘BlockStatisticsRasterTool_date_time’, where ‘date’ and ‘time’ are the date and time that the tool was run.
Statistics type (optional): The statistic type to be calculated, the default statistic type is MEAN. Select from the following:
- MEAN — Calculates the mean (average value) of the cells in the neighborhood.
- MAJORITY — Calculates the majority (value that occurs most often) of the cells in the neighborhood.
- MAXIMUM — Calculates the maximum (largest value) of the cells in the neighborhood.
- MEDIAN — Calculates the median of the cells in the neighborhood.
- MINIMUM — Calculates the minimum (smallest value) of the cells in the neighborhood.
- MINORITY — Calculates the minority (value that occurs least often) of the cells in the neighborhood.
- RANGE — Calculates the range (difference between largest and smallest value) of the cells in the neighborhood.
- STD — Calculates the standard deviation of the cells in the neighborhood.
- SUM — Calculates the sum (total of all values) of the cells in the neighborhood.
- VARIETY — Calculates the variety (the number of unique values) of the cells in the neighborhood.
Ignore NoData (optional): Denotes whether NoData values are ignored by the statistic calculation. Select from:
- DATA — Specifies that if a NoData value exists within a block neighborhood, the NoData value will be ignored. Only cells within the neighborhood that have data values will be used in determining the output value. This is the default.
- NODATA — Specifies that if any cell in a neighborhood has a value of NoData, the output for each cell in the corresponding block will receive NoData. With this option, the presence of a NoData value implies that there is insufficient information to determine the statistic value for the neighborhood.
Output File Workspace (optional): If you want the output geodata files to be saved in a different location to the ‘Output Workspace’ you can select a new location (folder or File Geodatabase, depending on the output file type). The result tables will still be written to the ‘Output Workspace’ specified above.
Output Filename Prefix (optional): Any text you enter in this input box will be added as a prefix (at the beginning) for all output file names.
Output Filename Suffix (optional): Any text you enter in this input box will be added as a suffix (at the end) for all output file names.