Summary
Computes the visibility levels of raster datasets in a mosaic dataset based on the spatial resolution.
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 can dramatically increase the size of your mosaic dataset. If your database size is inflated due to constant transactions, run the Compact tool.
Syntax
arcpy.management.CalculateCellSizeRanges(in_mosaic_dataset, {where_clause}, {do_compute_min}, {do_compute_max}, {max_range_factor}, {cell_size_tolerance_factor}, {update_missing_only})
Parameter | Explanation | Data Type |
in_mosaic_dataset | The mosaic dataset to calculate the visibility levels for. | Mosaic Layer |
where_clause (Optional) | An SQL expression to select specific rasters in the mosaic dataset on which to calculate visibility levels. If no query is specified, all the mosaic dataset items will have their cell size ranges calculated. | SQL Expression |
do_compute_min (Optional) | Compute the minimum pixel size for each selected raster in the mosaic dataset.
| Boolean |
do_compute_max (Optional) | Compute the maximum pixel size for each selected raster in the mosaic dataset.
| Boolean |
max_range_factor (Optional) | Set a multiplication factor to apply to the native resolution. The default is 10, meaning that an image with a resolution of 30 meters will be visible at a scale appropriate for 300 meters. The relationship between cell size and scale is as follows: Cell Size = Scale * 0.0254 / 96 Scale = Cell Size * 96 / 0.0254 | Double |
cell_size_tolerance_factor (Optional) | Use this to group images with similar resolutions as having the same nominal resolution. For example 1 m imagery and 0.9 m imagery can be grouped together by setting this factor to 0.1, because they are within 10% of each other. | Double |
update_missing_only (Optional) | Calculate only the missing cell size range values.
| Boolean |
Derived Output
Name | Explanation | Data Type |
out_mosaic_dataset | The updated mosaic dataset. | Mosaic Layer |
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)
Environments
Licensing information
- Basic: No
- Standard: Yes
- Advanced: Yes