Set Mosaic Dataset Properties (Data Management)
Summary
Sets the properties of a mosaic dataset. Many of these properties define the defaults used when displaying the mosaic dataset or how it can be used when it's published as an image service.
Usage
-
This tool allows you to set mosaic dataset properties within a geoprocessing or Python environment.
Syntax
Parameter | Explanation | Data Type |
in_mosaic_dataset |
The mosaic dataset that will have its properties set. | Mosaic Layer |
rows_maximum_imagesize (Optional) |
Set the maximum number of rows for the mosaicked image, generated by the mosaic dataset for each request. By increasing the rows and columns for the Maximum Image Size of Requests, you will be increasing the time it takes to process the mosaic. However, you may want to increase these numbers if you are printing very large, high-resolution plots. By making these numbers too small, an image may not display. For example, if you changed the numbers to 10, then the display window could only be 10 pixels in dimension, or smaller, to display an image. | Long |
columns_maximum_imagesize (Optional) |
Set the maximum number of columns for the mosaicked image, generated by the mosaic dataset for each request. By increasing the rows and columns for the Maximum Image Size of Requests, you will be increasing the time it takes to process the mosaic. However, you may want to increase these numbers if you are printing very large, high-resolution plots. By making these numbers too small, an image may not display. For example, if you changed the numbers to 10, then the display window could only be 10 pixels in dimension, or smaller, to display an image. | Long |
allowed_compressions [allowed_compressions,...] (Optional) |
Set the mosaic dataset's Allowed Compression Methods property, which defines the method of compression used to transmit the mosaicked image from the computer to the display (or from the server to the client).
| String |
default_compression_type (Optional) |
Set the default compression type. The default compression must be in the allowed_compressions list or already set in the mosaic dataset's Allowed Compression Methods property. | String |
JPEG_quality (Optional) |
Set the compression quality that will be used when JPEG compression is used. Compression quality can range from 1 to 100. A higher number means better image quality but less compression. | Long |
LERC_Tolerance (Optional) |
Specify the LERC tolerance, when the LERC compression method is used. The tolerance represents the maximum error value that is applicable per pixel (not an average for the image). This value is specified in the units of the mosaic dataset. For example, if the error is 10 centimeters and the mosaic dataset is in meters, enter 0.1. LERC is an efficient lossy compression method recommended for data with a large pixel depth, such as float, 32-bit, 16-bit, or 12-bit data. LERC compresses 5 to 10 times better and 5 to 10 times faster than LZ77 for float data. LERC is also better with integer data. When using integer data, and the error limit specified is 0.99 or less, LERC is considered a lossless compression. | Double |
resampling_type (Optional) |
Set the default resampling method used to display the mosaicked image.
| String |
clip_to_footprints (Optional) |
Specify whether you want to limit the extent of each raster to its footprint or to use the entire raster to create the mosaicked image. Many times, the raster and the footprint will be the same, but when they are different, you can specify whether or not to clip the raster.
| Boolean |
footprints_may_contain_nodata (Optional) | Specify whether the footprints of the mosaic dataset contain pixels of NoData.
| Boolean |
clip_to_boundary (Optional) |
Specify whether you want to clip the mosaic dataset's image to the boundary, or to display the entire mosaicked image. Often, the boundary will represent the entire mosaic dataset; however, you may modify it to exclude part of the dataset.
| Boolean |
color_correction (Optional) |
Choose whether to enable the color correction that has been set up for the mosaic dataset.
| Boolean |
allowed_mensuration_capabilities [allowed_mensuration_capabilities,...] (Optional) |
Choose the allowable mensuration capabilities for this mosaic dataset.
| String |
default_mensuration_capabilities (Optional) |
Choose the default mensuration capability for this mosaic dataset. The default must be set in the allowed_mensuration_capabilities parameter list or already set in the mosaic dataset's Mensuration Capabilities property. | String |
allowed_mosaic_methods [allowed_mosaic_methods,...] (Optional) |
Choose which mosaic methods will be allowed by this mosaic dataset. The mosaicked image can be created from a number of input rasters. The mosaic method defines how the mosaicked image is created from the different rasters in the mosaic dataset.
| String |
default_mosaic_method (Optional) |
Choose the default mosaic method for this mosaic dataset. The default must be set in the allowed_mosaic_methods parameter list or already set in the mosaic dataset's Allowed Mosaic Methods property. | String |
order_field (Optional) |
Choose the default field to use when ordering rasters using the By Attribute mosaic method. The list of fields is defined as those in the attribute table that are of type metadata and are integer. This list can include, but is not limited to:
If your field is a numeric or date field, then the Base Order parameter needs to be set. This parameter is not needed if By Attribute is not an allowed mosaic method. | String |
order_base (Optional) |
The images are sorted based on the difference between this value or the others in the Order Field of the attribute table. If you are using a Date attribute, then it needs to be in one of the following formats:
This parameter is not needed if By Attribute is not an allowed mosaic method. | String |
sorting_order (Optional) |
Choose whether to sort your rasters in an ascending or descending order.
This parameter is not needed if By Attribute is not an allowed mosaic method. | Boolean |
mosaic_operator (Optional) |
Choose which mosaic operator to use to resolve the overlapping cells.
| String |
blend_width (Optional) |
Defines the distance in pixels (at the display scale) used by the Blend mosaic operator. | Long |
view_point_x (Optional) | Defines an x-offset that is used to calculate where the center of the display is. This value is calculated in the unit of the spatial reference system of the mosaic dataset. This value will be used when the Closest to Viewpoint mosaic method is used. | Double |
view_point_y (Optional) | Defines a y-offset that is used to calculate where the center of the display is. This value is calculated in the unit of the spatial reference system of the mosaic dataset. This value will be used when the Closest to Viewpoint mosaic method is used. | Double |
max_num_per_mosaic (Optional) |
The maximum number of rasters that can used to create the mosaicked image. | Long |
cell_size_tolerance (Optional) |
Specify the cell size tolerance factor. The tolerance factor must be greater than or equal to 0.0. A factor of 0.1 means that all the LowPS values that are 10 percent larger than the lowest pixel size are considered to be the same—for tools and operations that use pixel (cell) sizes. | Double |
cell_size (Optional) | Specify the output cell size. You can choose a layer as the cell size template, or you can specify the actual cell size. If you specify the cell size, you can use a single value for a square cell size, or X and Y values for a rectangular cell size. | Cell Size XY |
metadata_level (Optional) |
Choose the level of metadata to expose from the server to a client when publishing the mosaic dataset.
| String |
transmission_fields [transmission_fields,...] (Optional) |
Choose the fields that users can access. This list can include fields that are not added by default to the mosaic dataset's attribute table. By default, the list includes:
| String |
use_time (Optional) |
Specify whether to make the mosaic dataset time aware. If time is activated, then you need to specify the start and end fields, and the time format.
| Boolean |
start_time_field (Optional) |
Specify the field in the attribute table to use as the start time. | String |
end_time_field (Optional) |
Specify the field in the attribute table to use as the end time. | String |
time_format (Optional) |
Specify the format of the time field.
| String |
geographic_transform [geographic_transform,...] (Optional) |
Choose which geographic transformations are associated with this mosaic dataset. | String |
max_num_of_download_items (Optional) |
Choose the maximum number of items that can be downloaded per request. | Long |
max_num_of_records_returned (Optional) |
Choose the maximum number of records returned per request. | Long |
Code Sample
This is a Python sample for SetMosaicDatasetProperties.
import arcpy
arcpy.SetMosaicDatasetProperties_management("c:/workspace/mdproperties.gdb/md", "", "", "",
"", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "",
"", "", "", "0.2", "BASIC",
"NAME;MINPS;MAXPS;GROUPNAME;PRODUCTNAME;ZORDER;YEARS;YEARE",
"ENABLED", "YEARS", "YEARE", "YYYYMM",
"NAD_1983_HARN_To_WGS_1984_2", "10", "500")
This is a Python script sample for SetMosaicDatasetProperties.
#===========================
#Set Mosaic Dataset Properties
'''Usage: SetMosaicDatasetProperties_management(in_mosaic_dataset, {rows_maximum_imagesize},
{columns_maximum_imagesize}, {None | JPEG | LZ77 | LERC},
{None | JPEG | LZ77 | LERC}, {JPEG_quality},
{LERC_Tolerance}, {BILINEAR | NEAREST |
CUBIC | MAJORITY}, {NOT_CLIP | CLIP},
{FOOTPRINTS_MAY_CONTAIN_NODATA | FOOTPRINTS_DO_NOT_CONTAIN_NODATA},
{CLIP | NOT_CLIP}, {NOT_APPLY | APPLY},
{Basic | Base-Top Height | Base-Top Shadow Height |
Top-Top Shadow Height | 3D}, {Basic | Base-Top Height |
Base-Top Shadow Height | Top-Top Shadow Height | 3D},
{Center | NorthWest | LockRaster | ByAttribute |
Nadir | Viewpoint | Seamline | None}, {Center |
NorthWest | LockRaster | ByAttribute | Nadir |
Viewpoint | Seamline | None}, {Name | MinPS |
MaxPS | LowPS | HighPS | Tag | GroupName |
ProductName | CenterX | CenterY | ZOrder |
SOrder | Shape_Length | Shape_Area}, {order_base},
{ASCENDING | DESCENDING}, {FIRST | LAST | MIN |
MAX | MEAN | BLEND}, {blend_width}, {view_point_x},
{view_point_y}, {max_num_per_mosaic},
{cell_size_tolerance}, {cell_size}, {FULL | NONE | BASIC},
{transmission_fields;transmission_fields...},
{DISABLED | ENABLED}, {start_time_field},
{end_time_field}, {YYYY | YYYYMM | YYYY/MM |
YYYY-MM | YYYYMMDD | YYYY/MM/DD | YYYY-MM-DD |
YYYYMMDDhhmmss | YYYY/MM/DD hh:mm:ss |
YYYY-MM-DD hh:mm:ss | YYYYMMDDhhmmss.s |
YYYY/MM/DD hh:mm:ss.s | YYYY-MM-DD hh:mm:ss.s},
{geographic_transform;geographic_transform...},
{max_num_of_download_items}, {max_num_of_records_returned})
'''
try:
import arcpy
arcpy.env.workspace = "C:/Workspace"
#Set mosaic dataset imagery properties group
arcpy.SetMosaicDatasetProperties_management("mdproperties.gdb/md", "525340", "3909809",
"None;JPEG", "JPEG", "85", "0.5", "CUBIC", "CLIP",
"FOOTPRINTS_MAY_CONTAIN_NODATA", "NOT_CLIP",
"APPLY", "Base-Top Height;Top-Top Shadow Height",
"Base-Top Height")
#Set mosaic dataset mosaic properties group
arcpy.SetMosaicDatasetProperties_management("mdproperties.gdb/md", "", "", "",
"", "", "", "", "", "", "", "", "", "",
"NorthWest;LockRaster;ByAttribute;Seamline",
"ByAttribute", "ZORDER", "3",
"DESCENDING", "BLEND", "10", "200",
"100", "40", "0.2")
#Set mosaic dataset catalog properties group
arcpy.SetMosaicDatasetProperties_management("mdproperties.gdb/md", "", "", "", "",
"", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "",
"", "", "1", "BASIC", "NAME;MINPS;MAXPS;GROUPNAME;PRODUCTNAME;ZORDER;YEARS;YEARE",
"ENABLED", "YEARS", "YEARE", "YYYYMM",
"NAD_1983_HARN_To_WGS_1984_2", "10", "500")
except:
print "Set Mosaic Dataset example failed."
print arcpy.GetMessages()