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 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.1. | 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/fgdb.gdb/md", "MIN_CELL_SIZES", "MAX_CELL_SIZES", "#", "#", "#")
This is a Python script sample for the CalculateCellSizeRanges tool.
##=========================== ##Calculate Cell Size Ranges ##Usage: CalculateCellSizeRanges_management in_mosaic_dataset {where_clause} {MIN_CELL_SIZES ## | NO_MIN_CELL_SIZES} {MAX_CELL_SIZES ## | NO_MAX_CELL_SIZES} {max_range_factor} ## {cell_size_tolerance_factor} {UPDATE_ALL ## | UPDATE_MISSING_ONLY} try: import arcpy arcpy.env.workspace = "C:/Workspace" # Calculate the Mininum Cell Size and Maximum Cell Size with default setting arcpy.CalculateCellSizeRanges_management("Cellsize.gdb/md", "#", "MIN_CELL_SIZES", "MAX_CELL_SIZES", "#", "#", "#") # Change the Cell Size Range factor to use Source data pyramid # Change the Cell Size Tolerance factor to ignore the small difference # Only update the items that do not have cell size values arcpy.CalculateCellSizeRanges_management("Cellsize.gdb/md", "#", "MIN_CELL_SIZES", "MAX_CELL_SIZES", "100", "1" "UPDATE_MISSING_ONLY") except: print "Calculate Cell Size Ranges example failed." print arcpy.GetMessages()