Set Mosaic Dataset Properties (Data Management)

License Level:BasicStandardAdvanced

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

Syntax

SetMosaicDatasetProperties_management (in_mosaic_dataset, {rows_maximum_imagesize}, {columns_maximum_imagesize}, {allowed_compressions}, {default_compression_type}, {JPEG_quality}, {LERC_Tolerance}, {resampling_type}, {clip_to_footprints}, {footprints_may_contain_nodata}, {clip_to_boundary}, {color_correction}, {allowed_mensuration_capabilities}, {default_mensuration_capabilities}, {allowed_mosaic_methods}, {default_mosaic_method}, {order_field}, {order_base}, {sorting_order}, {mosaic_operator}, {blend_width}, {view_point_x}, {view_point_y}, {max_num_per_mosaic}, {cell_size_tolerance}, {cell_size}, {metadata_level}, {transmission_fields}, {use_time}, {start_time_field}, {end_time_field}, {time_format}, {geographic_transform}, {max_num_of_download_items}, {max_num_of_records_returned})
ParameterExplanationData 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).

  • NONENo compression will be used.
  • JPEGJPEG compression will be used.
  • LZWLZW compression will be used.
  • LERCLimited Error Raster Compression will be used.
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.

  • NEARESTThe nearest neighbor resampling method will be used.
  • BILINEARThe bilinear interpolation resampling method will be used.
  • CUBICThe cubic convolution resampling method will be used.
  • MAJORITYThe majority resampling method will be used.
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.

  • NOT_CLIPDo not clip the raster to the footprint. This is the default.
  • CLIPClip the rasters to the footprint.
Boolean
footprints_may_contain_nodata
(Optional)

Specify whether the footprints of the mosaic dataset contain pixels of NoData.

  • FOOTPRINTS_MAY_CONTAIN_NODATAYour footprints contain pixels of NoData. Check this on to ensure that there are no holes in your mosaic dataset. This is the default.
  • FOOTPRINTS_DO_NOT_CONTAIN_NODATAYour footprints do not contain pixels of NoData. If you specify this setting, you may have a slight performance benefit. However, if there are pixels of NoData in your footprints, you will see holes in your mosaic dataset.
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.

  • CLIP Clip the mosaicked image to the boundary. This is the default.
  • NOT_CLIPDo not clip the mosaicked image to the boundary.
Boolean
color_correction
(Optional)

Choose whether to enable the color correction that has been set up for the mosaic dataset.

  • NOT_APPLYKeep color correction off. This is the default.
  • APPLYUse 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.

  • BasicDistance, point, centroid, and area calculations are allowed.
  • Base-Top HeightBase-to-top height measurements are allowed. In order to perform Base-Top Height measurements, rational polynomial coefficients (RPCs) information is required.
  • Base-Top Shadow HeightBase-to-top shadow height measurements are allowed. In order to perform Base-Top Shadow Height measurements, sun azimuth and sun elevation information is required.
  • Top-Top Shadow HeightTop-to-top shadow height measurements are allowed. In order to perform this measurement, sun azimuth, sun elevation, and rational polynomial coefficients (RPCs) information is required.
  • 3D3D measurements are allowed when a DEM is available.
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.

  • CenterEnables rasters to be sorted based on a default order, where rasters that have their centers closest to the view center are placed on top.
  • NorthWestEnables raster ordering in a view-independent way, where rasters with their centers to the northwest are displayed on top.
  • LockRasterEnables a user to lock the display of single or multiple rasters based on the ObjectID.
  • ByAttributeEnables raster ordering based on a defined metadata attribute and its difference from a base value.
  • NadirEnables rasters to be sorted by the distance between the nadir position and view center. This is similar to the Closest to Center method but uses the nadir point to a raster, which may be different than the center, especially for oblique imagery.
  • ViewpointOrders rasters based on a user-defined location and nadir location for the rasters using the Viewpoint tool.
  • SeamlineCuts the rasters using the predefined seamline shape for each raster using optional feathering along the seams. The ordering is predefined during seamline generation. The LAST mosaic operator is not valid with this mosaic method.
  • NoneOrders rasters based on the order (ObjectID) in the mosaic dataset attribute table.
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:

  • Name
  • MinPS
  • MaxPS
  • LowPS
  • HighPS
  • Tag
  • GroupName
  • ProductName
  • CenterX
  • CenterY
  • ZOrder
  • Shape_Length
  • Shape_Area

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:

  • YYYY/MM/DD HH:mm:ss.s
  • YYYY/MM/DD HH:mm:ss
  • YYYY/MM/DD HH:mm
  • YYYY/MM/DD HH
  • YYYY/MM/DD
  • YYYY/MM
  • YYYY

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.

  • ASCENDINGUse an ascending order for your rasters. This is the default setting.
  • DESCENDINGUse a descending order for your rasters.

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.

  • FIRSTThe overlapping areas will contain the cells from the first raster dataset listed in the source.
  • LASTThe overlapping areas will contain the cells from the last raster dataset listed in the source.
  • MINThe overlapping areas will contain the minimum cell values from all the overlapping cells.
  • MAXThe overlapping areas will contain the maximum cell values from all the overlapping cells.
  • MEANThe overlapping areas will contain the mean cell values from all the overlapping cells.
  • BLENDThe overlapping areas will be a blend of the cell values that overlap along the edge of each raster dataset in the mosaicked image. By default, the edge is defined by the footprint or the seamline for each raster.
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.

  • FULLAll metadata, including the basic raster dataset information and the function chain's details, will be transmitted. This is the default.
  • NONENo metadata will be exposed to the client.
  • BASICThe raster dataset level of information will be transmitted, such as the columns and rows, cell size, and spatial reference information.
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:

  • Name
  • MinPS
  • MaxPS
  • LowPS
  • HighPS
  • Tag
  • GroupName
  • ProductName
  • CenterX
  • CenterY
  • ZOrder
  • Shape_Length
  • Shape_Area

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.

  • DISABLEDThe mosaic dataset will not be time aware. This is the default.
  • ENABLEDThe mosaic dataset will be time aware. This allows the client to use the Time Slider.
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.

  • YYYYYear
  • YYYYMMYear and month
  • YYYY/MMYear and month
  • YYYY-MMYear and month
  • YYYYMMDDYear, month, and day
  • YYYY/MM/DDYear, month, and day
  • YYYY-MM-DDYear, month, and day
  • YYYYMMDDhhmmssYear, month, day, hour, minute, and seconds
  • YYYY/MM/DD hh:mm:ssYear, month, day, hour, minute, and seconds
  • YYYY-MM-DD hh:mm:ssYear, month, day, hour, minute, and seconds
  • YYYYMMDDhhmmss.sYear, month, day, hour, minute, seconds, and fraction of seconds
  • YYYY/MM/DD hh:mm:ss.sYear, month, day, hour, minute, seconds, and fraction of seconds
  • YYYY-MM-DD hh:mm:ss.sYear, month, day, hour, minute, seconds, and fraction of seconds
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

SetMosaicDatasetProperties example 1 (Python window)

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")
SetMosaicDatasetProperties example 2 (stand-alone script)

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()

Environments

This tool does not use any geoprocessing environments

Related Topics

Licensing Information

ArcGIS for Desktop Basic: No
ArcGIS for Desktop Standard: Yes
ArcGIS for Desktop Advanced: Yes
11/18/2013