Calculate Cell Size Ranges (Data Management)
Summary
Computes the minimum and maximum cell sizes for the rasters in a mosaic dataset.
Usage
-
This tool automatically calculates the cell size ranges for the mosaic dataset items. The calculated cell size ranges are stored in the mosaic dataset attribute table in the MinPS and MaxPS columns. If you need to have specific values for the MinPS and MaxPS columns, you can edit these values manually.
-
You cannot calculate cell size ranges for a referenced mosaic dataset.
Database fragmentation and frequent data manipulation may increase the size of your mosaic dataset dramatically. If your database size is inflated due to constant transactions, you should run the Compact tool.
Syntax
Parameter | Explanation | Data Type |
in_mosaic_dataset |
Path and name of the mosaic dataset. | Mosaic Layer |
where_clause (Optional) | Define a SQL query if you only want to calculate the cell size ranges for a subset of the mosaic dataset items. If no query is specified, all the mosaic dataset items will have their cell size ranges calculated. | SQL Expression |
do_compute_min (Optional) |
Computes the minimum pixel size for all the rasters in the mosaic dataset.
| Boolean |
do_compute_max (Optional) |
Computes the maximum pixel size for all the rasters in the mosaic dataset.
| Boolean |
max_range_factor (Optional) |
The factor by which the high pixel size is multiplied by, to obtain the maximum pixel size value for the base rasters in the mosaic dataset. The default is 10. | Double |
cell_size_tolerance_factor (Optional) |
Allows you to specify a cell size tolerance. This is useful when you have rasters with differing pixel sizes that should be considered the same. The default is 0.8. | Double |
update_missing_only (Optional) |
Allows you to calculate only the missing cell size range values.
| Boolean |
Code Sample
This is a Python sample for the CalculateCellSizeRanges tool.
import arcpy
arcpy.CalculateCellSizeRanges_management(
"C:/Workspace/cellsize.gdb/md", "#", "MIN_CELL_SIZES",
"MAX_CELL_SIZES", "20", "1", "UPDATE_MISSING_ONLY")
This is a Python script sample for the CalculateCellSizeRanges tool.
# Calculate the Mininum Cell Size and Maximum Cell Size with default setting
import arcpy
arcpy.env.workspace = "C:/Workspace"
mdname = "cellsize.gdb/md"
query = "#"
calmin = "MIN_CELL_SIZES"
calmax = "MAX_CELL_SIZES"
maxfactor = "#"
tolerancefactor = "#"
updatemiss = "#"
arcpy.CalculateCellSizeRanges_management(
mdname, query, calmin, calmax, maxfactor, tolerancefactor, updatemiss)