Synchronize Mosaic Dataset (Data Management)

Summary

Rebuilds the raster item and updates affected fields in the mosaic dataset using the raster type and options that were used when it was originally added.

Usage

Syntax

SynchronizeMosaicDataset_management (in_mosaic_dataset, {where_clause}, {new_items}, {sync_only_stale}, {update_cellsize_ranges}, {update_boundary}, {update_overviews}, {build_overviews}, {build_pyramids}, {calculate_statistics}, {build_thumbnails})
ParameterExplanationData Type
in_mosaic_dataset

The path and name of the mosaic dataset.

Mosaic Layer
where_clause
(Optional)

Using SQL, you can define a query or use the Query Builder to build a query.

SQL Expression
new_items
(Optional)

Choose whether to synchronize your mosaic dataset with newly added items. If you choose to use this option, the item's workspace will be searched for new images. When an image is added to the mosaic dataset, it will use the same raster type as the other items within the same workspace.

If you choose to update with the new items, then you can choose whether to Update Cell Size Ranges, Update Boundary, or Update Overview parameters.

  • NO_NEW_ITEMSDo not add any new items which may exist. This is the default.
  • UPDATE_WITH_NEW_ITEMSChecked—Update the mosaic dataset with the new items in the workspaces. Use the Advanced Option to choose to update the cell size ranges, the boundary, or the overviews.
Boolean
sync_only_stale
(Optional)

If the base rasters used to create a derived raster, such as an overview, have been synchronized, then the overview will be updated.

  • SYNC_ONLY_STALE Only update or re-create the overview or derived rasters, if the base rasters have been synchronized. This is the default.
  • SYNC_ALL_SELECTEDIf the base rasters used to create a derived raster, such as an overview, have been synchronized, then the overview will be updated.
Boolean
update_cellsize_ranges
(Optional)

Choose whether to update the cell size ranges. This parameter is only available if new_items has been set to UPDATE_WITH_NEW_ITEMS.

  • UPDATE_CELL_SIZES The cell size ranges will be recalculated when the mosaic dataset is synchronized. This is the default.
  • NO_CELL_SIZES The cell size ranges will not be recalculated.
Boolean
update_boundary
(Optional)

Choose whether to update the boundary. This parameter is only available if new_items has been set to UPDATE_WITH_NEW_ITEMS.

  • UPDATE_BOUNDARY The boundary will be rebuilt when the mosaic dataset is synchronized. This is the default.
  • NO_BOUNDARY The boundary will not be rebuilt.
Boolean
update_overviews
(Optional)

Choose whether to update the cell size ranges. This parameter is only available if new_items has been set to UPDATE_WITH_NEW_ITEMS.

  • NO_OVERVIEWS The overviews will not be rebuilt. This is the default.
  • UPDATE_OVERVIEWS The overviews will be rebuilt when the mosaic dataset is synchronized.
Boolean
build_overviews
(Optional)

Overviews are low-resolution raster datasets created to improve the display speed when viewing a mosaic dataset. Generally, they are created to cover the extent of the raster data in the mosaic dataset. They are similar to raster pyramids.

Overviews may need to be rebuilt if the underlying rasters are modified.

  • BUILD_OVERVIEWSStale overviews will be updated or new overviews created to reflect the changes in the updated raster items in the mosaic dataset. This is the default.
  • NO_BUILD_OVERVIEWSOverviews will not be modified or created.
Boolean
build_pyramids
(Optional)

Pyramids can be built for each raster item in the mosaic dataset. Pyramids can improve the speed at which each raster is displayed.

  • NO_BUILD_PYRAMIDSPyramids will not be generated. This is the default.
  • BUILD_PYRAMIDS Pyramids will be generated for all the raster items in the mosaic dataset, or only those selected.
Boolean
calculate_statistics
(Optional)

Statistics can be calculated for each raster item in the mosaic dataset. Statistics are required for your mosaic dataset when performing certain tasks, such as applying a contrast stretch.

  • NO_CALCULATE_STATISTICSStatistics will not be calculated. This is the default.
  • CALCULATE_STATISTICS Statistics will be calculated for all the raster items in the mosaic dataset, or only those selected.
Boolean
build_thumbnails
(Optional)

Thumbnails are small, highly resampled images that can be created for each raster item in the mosaic definition. Thumbnails can be accessed when the mosaic dataset is accessed as an image service and will display as part of the metadata (Item Description).

  • NO_BUILD_THUMBNAILSNo thumbnails will be created or updated. This is the default.
  • BUILD_THUMBNAILSThumbnails will be generated or updated for all the raster items in the mosaic dataset, or only those selected.
Boolean

Code Sample

SynchronizeMosaicDataset example 1 (Python window)

This is a Python sample for SynchronizeMosaicDataset.

import arcpy
arcpy.SynchronizeMosaicDataset_management("c:/workspace/fgdb.gdb/sync", \
                                          "Year>1999", "UPDATE_WITH_NEW_ITEMS", \
                                          "SYNC_STALE","#", "#", \
                                          "UPDATE_OVERVIEWS", "#", "#", \
                                          "BUILD_THUMBNAILS")
SynchronizeMosaicDataset example 2 (stand-alone script)

This is a Python script sample for SynchronizeMosaicDataset.

##===========================
##Synchronize Mosaic Dataset
##Usage: SynchronizeMosaicDataset_management in_mosaic_dataset {where_clause} 
##                                           {NO_NEW_ITEMS | UPDATE_WITH_NEW_ITEMS} 
##                                           {SYNC_STALE | SYNC_ALL} {UPDATE_CELL_SIZES 
##                                           | NO_CELL_SIZES} {UPDATE_BOUNDARY | NO_BOUNDARY}
##                                           {NO_OVERVIEWS | UPDATE_OVERVIEWS} {NO_PYRAMIDS 
##                                           | BUILD_PYRAMIDS} {NO_STATISTICS | 
##                                           CALCULATE_STATISTICS} {NO_THUMBNAILS 
##                                           | BUILD_THUMBNAILS} 

try:
    import arcpy
    arcpy.env.workspace = r"C:/Workspace"
    # Synchronize data item after Year 1999
    arcpy.SynchronizeMosaicDataset_management("Sync.gdb/md", "Year>1999", \
                                              "UPDATE_WITH_NEW_ITEMS", "SYNC_STALE",\
                                              "#", "#", "UPDATE_OVERVIEWS", "#",
                                              "#", "BUILD_THUMBNAILS")
    
except:
    print "Synchronize Mosaic Dataset example failed."
    print arcpy.GetMessages()

Environments

Related Topics

Licensing Information

ArcView: No
ArcEditor: Yes
ArcInfo: Yes

10/27/2014