Set Mosaic Dataset Properties (Data Management)

Summary

Defines the defaults for displaying a mosaic dataset and serving it as an image service.

Usage

  • The current mosaic dataset properties can be found in under the Defaults tab of the Mosaic Dataset Properties.

Syntax

arcpy.management.SetMosaicDatasetProperties(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}, {data_source_type}, {minimum_pixel_contribution}, {processing_templates}, {default_processing_template}, {time_interval}, {time_interval_units}, {product_definition}, {product_band_definitions})
ParameterExplanationData Type
in_mosaic_dataset

The mosaic dataset whose properties need to be set.

Mosaic Layer
rows_maximum_imagesize
(Optional)

The maximum number of rows for the mosaicked image, generated by the mosaic dataset for each request. This can help control how much work your server has to do when clients see your imagery. A higher number will create a larger image, but will also increase the amount of time to process the mosaic dataset. It is possible to set the value too small, and the image may not display.

Long
columns_maximum_imagesize
(Optional)

The maximum number of columns for the mosaicked image, generated by the mosaic dataset for each request. This can help control how much work your server has to do when clients see your imagery. A higher number will create a larger image, but will also increase the amount of time to process the mosaic dataset. It is possible to set the value too small, and the image may not display.

Long
allowed_compressions
[allowed_compressions,...]
(Optional)

Define the method of compression for transmitting the mosaicked image from the computer to the display (or from the server to the client).

  • NoneNo compression will be used.
  • JPEG Compresses up to 8:1 and is suitable for backdrops
  • LZ77 Compresses approximately 2:1. Suitable for analysis.
  • LERCCompresses between 10:1 and 20:1. Compresses fast and is suitable for serving raw imagery with high bit-depth (12-bit to 32-bit)
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.

  • NoneNo compression will be used.
  • JPEG Compresses up to 8:1 and is suitable for backdrops
  • LZ77 Compresses approximately 2:1. Suitable for analysis.
  • LERCCompresses between 10:1 and 20:1. Compresses fast and is suitable for serving raw imagery with high bit-depth (12-bit to 32-bit)
String
JPEG_quality
(Optional)

The compression quality when using JPEG. Compression quality ranges from 1 to 100. A higher number means better image quality but less compression.

Long
LERC_Tolerance
(Optional)

Limits the per pixel error when using LERC compression. 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.

Double
resampling_type
(Optional)

Determines how pixel values will be calculated when the dataset is displayed at small scales. Choose an appropriate technique based on the type of data you have.

  • NEARESTThe fastest resampling method, and it minimizes changes to pixel values. Suitable for discrete data, such as land cover.
  • BILINEAR Calculates the value of each pixel by averaging, based on distance, the values of the surrounding 4 pixels. Suitable for continuous data.
  • CUBICCalculates the value of each pixel by fitting a smooth curve based on the surrounding 16 pixels. Produces the smoothest image, but can create values outside of the range found in the source data. Suitable for continuous data.
  • MAJORITYDetermines the value of each pixel based on the most popular value within a 3 by 3 window. Suitable for discrete data.
String
clip_to_footprints
(Optional)

Often the raster dataset and its footprint have the same extent. If they differ, you can clip the raster dataset to the footprint.

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

Allow for pixels that have NoData values.

  • FOOTPRINTS_MAY_CONTAIN_NODATAShow pixels with NoData values. This is the default.
  • FOOTPRINTS_DO_NOT_CONTAIN_NODATADo not show pixels with NoData values. Note that while you may see an improvement in performance, if your imagery does have NoData values, they will appear as holes in your mosaic dataset.
Boolean
clip_to_boundary
(Optional)

Often the mosaic dataset and its boundary have the same extent. If they differ, you can clip the mosaic dataset to the boundary.

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

Enable color correction on 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_capability,...]
(Optional)

Choose which measurements your viewers can perform on the mosaic dataset. The ability to perform vertical measurements is dependent on your imagery and may require a DEM.

  • NoneNo mensuration capabilities will be allowed.
  • Basic Allow ground measurements such as distance, point, centroid, and area calculations.
  • Base-Top HeightAllow measurements from the base to the top of features. Rational polynomial coefficients must be imbedded within the imagery.
  • Base-Top Shadow HeightAllow measurements from the base of a feature to the top of its shadow. Sun azimuth and sun elevation information is required.
  • Top-Top Shadow HeightAllow measurements from the top of a feature to the top of its shadow. Sun azimuth, sun elevation, and rational polynomial coefficients are required.
  • 3DA DEM must be 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.

  • NoneNo mensuration capabilities will be allowed.
  • Basic Allow ground measurements such as distance, point, centroid, and area calculations.
  • Base-Top HeightAllow measurements from the base to the top of features. Rational polynomial coefficients must be imbedded within the imagery.
  • Base-Top Shadow HeightAllow measurements from the base of a feature to the top of its shadow. Sun azimuth and sun elevation information is required.
  • Top-Top Shadow HeightAllow measurements from the top of a feature to the top of its shadow. Sun azimuth, sun elevation, and rational polynomial coefficients are required.
  • 3DA DEM must be available.
String
allowed_mosaic_methods
[allowed_mosaic_method,...]
(Optional)

Define the rules for displaying overlapping imagery.

  • NoneOrder rasters based on the ObjectID in the mosaic dataset attribute table.
  • CenterDisplay imagery that is closest to the center of the screen.
  • NorthWestDisplay imagery that is closest to the northwest corner of the mosaic dataset boundary.
  • LockRasterSelect specific raster datasets to display.
  • ByAttributeDisplay and prioritize imagery based on a field in from the attribute table.
  • NadirDisplay the rasters with viewing angles closest to zero.
  • ViewpointDisplay imagery that is closest to a selected viewing angle.
  • SeamlineSmooth transitions between images using seamlines.
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.

  • NoneOrder rasters based on the ObjectID in the mosaic dataset attribute table.
  • CenterDisplay imagery that is closest to the center of the screen.
  • NorthWestDisplay imagery that is closest to the northwest corner of the mosaic dataset boundary.
  • LockRasterSelect specific raster datasets to display.
  • ByAttributeDisplay and prioritize imagery based on a field in from the attribute table.
  • NadirDisplay the rasters with viewing angles closest to zero.
  • ViewpointDisplay imagery that is closest to a selected viewing angle.
  • SeamlineSmooth transitions between images using seamlines.
String
order_field
(Optional)

Choose the default field to use when ordering rasters using the ByAttribute 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:

  • MinPS
  • MaxPS
  • LowPS
  • HighPS
  • CenterX
  • CenterY
  • ZOrder
  • Shape_Length
  • Shape_Area

If your field is a numeric or date field, then the order_base parameter needs to be set.

This parameter is not needed if ByAttribute is not an allowed mosaic method.

String
order_base
(Optional)

Sort the rasters based on their difference from this value in the field selected in the order_field parameter

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 needs to be specified only if ByAttribute is specified for the allowed_mosaic_method parameter.

String
sorting_order
(Optional)

Choose whether to sort your rasters in an ascending or descending order.

  • ASCENDINGSort ascending. This is the default setting.
  • DESCENDINGSort descending.

This parameter needs to be specified only if ByAttribute is specified for the allowed_mosaic_method parameter.

Boolean
mosaic_operator
(Optional)

Define rules for resolving overlapping pixels.

  • FIRSTDisplay the first image within the attribute table.
  • LASTDisplay the last image within the attribute table.
  • MINDisplay the lowest pixel values.
  • MAXDisplay the highest pixel values.
  • MEANUse arithmetic mean to average overlapping pixels.
  • BLENDUse a distance weighted algorithm to average overlapping pixels.
  • SUMAdd all of the overlapping pixel values.
String
blend_width
(Optional)

Set the number of pixels over which to apply the BLEND mosaic_operator.

Long
view_point_x
(Optional)

When using the viewpoint mosaic method, you can horizontally shift the center of the image using this parameter. The units are the same as the spatial reference system.

Double
view_point_y
(Optional)

When using the viewpoint mosaic method, you can vertically shift the center of the image using this parameter. The units are the same as the spatial reference system.

Double
max_num_per_mosaic
(Optional)

Set the maximum number of raster datasets that can be displayed at a given time in a mosaic dataset.

Long
cell_size_tolerance
(Optional)

Consider images of similar spatial resolutions as having the same nominal resolution. For example, with a factor of 0.1, all images with cell sizes within 10 percent of each other will be grouped together for tools and operations that use cell sizes.

Double
cell_size
(Optional)

Set the cell size of the mosaic dataset using an existing raster dataset or specify its width (x) and height (y). 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)

Set the level of metadata to expose from the server to a client when publishing the mosaic dataset.

  • FULLTransmit metadata about processing applied at the mosaic dataset level as well as metadata related to the individual raster datasets.
  • NONENo metadata will be exposed to the client.
  • BASICTransmit metadata related to individual raster datasets, such as the number of columns and rows, cell size, and spatial reference information.
String
transmission_fields
[transmission_field,...]
(Optional)

Limit the fields in the attribute table that clients can view. By default, the list includes:

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

String
use_time
(Optional)

Enable animation through time on the mosaic dataset. If time is activated, 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)

The field from the attribute table that shows the start time.

String
end_time_field
(Optional)

The field from the attribute table that shows the end time.

String
time_format
(Optional)

Select the format that represents time in the fields chosen above.

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

The geographic transformations to associate with this mosaic dataset.

String
max_num_of_download_items
(Optional)

Limit the number of raster datasets that can be downloaded per request.

Long
max_num_of_records_returned
(Optional)

Limit the number of records that can be downloaded per request.

Long
data_source_type
(Optional)

Define the type of imagery in the mosaic dataset.

  • GENERICThe mosaic dataset does not have a specified data type.
  • THEMATICThematic data has discrete values, such as land cover.
  • PROCESSEDThe mosaic dataset has been color adjusted.
  • ELEVATIONThe mosaic dataset contains elevation data.
  • SCIENTIFICThe mosaic dataset contains scientific data.
  • VECTOR_UVThe mosaic dataset has two variables.
  • VECTOR_MAGDIRThe mosaic dataset has magnitude and direction.
String
minimum_pixel_contribution
(Optional)

Set the minimum number of pixels required for a mosaic dataset item to be considered significant enough to be used in the mosaic dataset. Because of overlapping imagery, you may have an item that is displaying a small sliver of its overall image. Skipping these mosaic dataset items will help the performance of the mosaic dataset.

Long
processing_templates
[processing_templates,...]
(Optional)

Choose the function chains that you want to use to process a mosaic dataset or the mosaic dataset items, on-the-fly. You can add, remove, or reorder the function chains.

All the template names that are added need to be unique.

For information on how to work with function chains, refer to Raster function template.

File; String
default_processing_template
(Optional)

Define the default function chain. The default function chain will be applied when the mosaic dataset is accessed.

String
time_interval
(Optional)

Specify the duration that represents each time step interval. The time step interval defines the granularity of the temporal data. The unit of time is specified in the time_interval_units parameter.

Double
time_interval_units
(Optional)

Choose the appropriate units for your time interval.

  • NoneThere is no time unit, or the units are unknown.
  • MillisecondsThe time units are in milliseconds.
  • SecondsThe time units are in seconds.
  • MinutesThe time units are in minutes.
  • HoursThe time units are in hours.
  • DaysThe time units are in days.
  • WeeksThe time units are in weeks.
  • MonthsThe time units are in months.
  • YearsThe time units are in years.
  • DecadesThe time units are in decades.
  • CenturiesThe time units are in centuries.
String
product_definition
(Optional)

Select a template that is either specific to the type of imagery you are working with or is generic. The generic options include the standard supported raster sensor types as follows:

  • NONENo band ordering is specified for the mosaic dataset. This is the default.
  • NATURAL_COLOR_RGBCreate a 3-band mosaic dataset, with red, green, and blue wavelength ranges. This is designed for natural color imagery.
  • NATURAL_COLOR_RGBICreate a 4-band mosaic dataset, with red, green, blue, and near infrared wavelength ranges.
  • VECTOR_FIELD_UVCreate a mosaic dataset displaying two variables.
  • VECTOR_FIELD_MAGNITUDE_DIRECTIONCreate a mosaic dataset displaying magnitude and direction.
  • FALSE_COLOR_IRGCreate a 3-band mosaic dataset, with near infrared, red, and green wavelength ranges.
  • DMCII_3BANDSCreate a 3-band mosaic dataset using the DMCii wavelength ranges.
  • DEIMOS2_4BANDSCreate a 4-band mosaic dataset using the Deimos-2 wavelength ranges.
  • DUBAISAT-2_4BANDSCreate a 4-band mosaic dataset using the DubaiSat-2 wavelength ranges.
  • FORMOSAT-2_4BANDSCreate a 4-band mosaic dataset using the FORMOSAT-2 wavelength ranges.
  • GEOEYE-1_4BANDSCreate a 4-band mosaic dataset using the GeoEye-1 wavelength ranges.
  • GF-1 PMS_4BANDSCreate a 4-band mosaic dataset using the Gaofen-1 Panchromatic Multispectral Sensor wavelength ranges.
  • GF-1 WFV_4BANDSCreate a 4-band mosaic dataset using the Gaofen-1 Wide Field of View Sensor wavelength ranges.
  • GF-2 PMS_4BANDSCreate a 4-band mosaic dataset using the Gaofen-2 Panchromatic Multispectral Sensor wavelength ranges.
  • GF-4 PMI_4BANDSCreate a 4-band mosaic dataset using the Gaofen-4 panchromatic and multispectral wavelength ranges.
  • HJ 1A/1B CCD_4BANDSCreate a 4-band mosaic dataset using the Huan Jing-1 CCD Multispectral or Hyperspectral Sensor wavelength ranges.
  • IKONOS_4BANDSCreate a 4-band mosaic dataset using the IKONOS wavelength ranges.
  • JILIN-1_3BANDSCreate a 3-band mosaic dataset using the Jilin-1 wavelength ranges.
  • KOMPSAT-2_4BANDSCreate a 4-band mosaic dataset using the KOMPSAT-2 wavelength ranges.
  • KOMPSAT-3_4BANDSCreate a 4-band mosaic dataset using the KOMPSAT-3 wavelength ranges.
  • LANDSAT_6BANDSCreate a 6-band mosaic dataset using the Landsat 5 and 7 wavelength ranges from the TM and ETM+ sensors.
  • LANDSAT_8BANDSCreate an 8-band mosaic dataset using the LANDSAT 8 wavelength ranges.
  • LANDSAT_MSS_4BANDSCreate a 4-band mosaic dataset using the Landsat wavelength ranges from the MSS sensor.
  • PLEIADES-1_4BANDSCreate a 4-band mosaic dataset using the PLEIADES-1 wavelength ranges.
  • QUICKBIRD_4BANDSCreate a 4-band mosaic dataset using the QuickBird wavelength ranges.
  • RAPIDEYE_5BANDSCreate a 5-band mosaic dataset using the RapidEye wavelength ranges.
  • SENTINEL2_13BANDSCreate a 13-band mosaic dataset using the Sentinel 2 MSI wavelength ranges.
  • SKYSAT_4BANDSCreate a 4-band mosaic dataset using the SkySat-C MSI wavelength ranges.
  • SPOT-5_4BANDSCreate a 4-band mosaic dataset using the SPOT-5 wavelength ranges.
  • SPOT-6_4BANDSCreate a 4-band mosaic dataset using the SPOT-6 wavelength ranges.
  • SPOT-7_4BANDSCreate a 4-band mosaic dataset using the SPOT-7 wavelength ranges.
  • TH-01_4BANDSCreate a 4-band mosaic dataset using the Tian Hui-1 wavelength ranges.
  • WORLDVIEW-2_8BANDSCreate an 8-band mosaic dataset using the WorldView-2 wavelength ranges.
  • WORLDVIEW-3_8BANDSCreate an 8-band mosaic dataset using the WorldView-3 wavelength ranges.
  • WORLDVIEW-4_4BANDSCreate a 4-band mosaic dataset using the WorldView-4 wavelength ranges.
  • ZY1-02C PMS_3BANDSCreate a 3-band mosaic dataset using the ZiYuan-1 panchromatic/multispectral wavelength ranges.
  • ZY3-CRESDA_4BANDSCreate a 4-band mosaic dataset using the ZiYuan-3 CRESDA wavelength ranges.
  • ZY3-SASMAC_4BANDSCreate a 4-band mosaic dataset using the ZiYuan-3 SASMAC wavelength ranges.
  • CUSTOMDefine the number of bands and the average wavelength for each band.
String
product_band_definitions
[Band Name {Wavelength Minimum} {Wavelength Maximum},...]
(Optional)

Edit the product_definition by adjusting the wavelength ranges, changing the number of bands or the band order, and adding new bands when using the CUSTOM product definition.

Value Table

Derived Output

NameExplanationData Type
out_mosaic_dataset

The updated mosaic dataset.

Mosaic Layer

Code sample

SetMosaicDatasetProperties example 1 (Python window)

This is a Python sample for the SetMosaicDatasetProperties tool.

import arcpy
arcpy.SetMosaicDatasetProperties_management(
    "c:/workspace/mdproperties.gdb/md", cell_size="0.2", metadata_level="BASIC", 
    transmission_fields="NAME;MINPS;MAXPS;GROUPNAME;PRODUCTNAME;ZORDER;YEARS;YEARE", 
    use_time="ENABLED", start_time_field="YEARS", end_time_field="YEARE", 
    time_format="YYYYMM", geographic_transform=
    "NAD_1983_HARN_To_WGS_1984_2", max_num_of_download_items="10", 
    max_num_of_records_returned="500", source_type="GENERIC", 
    minimum_pixel_contribution="50", processing_templates="None;C:/Test/NewRFTs/Aspect.rft.xml", 
    default_processing_template="None")
SetMosaicDatasetProperties example 2 (stand-alone script)

This is a Python script sample for the SetMosaicDatasetProperties tool.

#Set mosaic dataset imagery properties group

import arcpy
arcpy.env.workspace = "C:/Workspace"

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

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: No
  • Standard: Yes
  • Advanced: Yes