ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Synchronize Mosaic Dataset

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Keeps your mosaic dataset up to date. In addition to syncing data, you can update overviews if the underlying imagery has been changed, generate new overviews and cache, and restore the original configuration of mosaic dataset items. You can also remove paths to source data with this tool. To repair paths, you need to use the Repair Mosaic Dataset Paths tool.

Synchronization is a one-way operation: changes in the source data can be synchronized to the mosaic dataset’s attribute table, thereby updating the mosaic dataset's attribute table. Changes in the mosaic dataset's attribute table will not affect the source data.

Caution:

Changes made with the synchronization cannot be undone. You may want to create a backup copy if you've made modifications to your mosaic data that could be overwritten.

Usage

  • You can use a selection set with this tool to limit the raster items that are updated. When there is a selection or query, only those items will be processed.

  • The synchronization can add new items, update existing items, or remove items.

  • Stale items refer to source rasters that have been changed since the mosaic dataset has been created or the last time the mosaic dataset was synchronized. For instance, the georeferencing may have been updated or the pyramids may have been built.

  • Since the raster items are reconstructed, any modifications made to these items since the last time they were built would be lost, such as editing functions or content in the attribute table.

  • If you choose to remove items that have broken data sources, make sure that all your network connections are working properly—this tool will remove any items that cannot be accessed.

  • This tool can also build pyramids and calculate statistics on the source rasters, and create thumbnails and raster cache for the raster items.

  • This tool is particularly useful for keeping mosaic datasets up-to-date. If new raster datasets have been added to the workspaces that this mosaic dataset accesses, the new raster datasets can be added into the mosaic dataset. Mosaic datasets that are populated using tables that reside in an externally managed database can also be updated with this tool.

  • Once the synchronization has completed, the operations listed in Mosaic Dataset Options (the update_cellsize_ranges, update_boundary, and update_overviews parameters in Python) will take place.

  • This tool can be used to generate the cache for an item in the mosaic dataset. Items that can always be cached are created from the following data: LAS files, LAS dataset, and terrains. Items can also be cached using the Cached Raster function.

  • Database fragmentation and frequent data manipulation may increase the size of your mosaic dataset dramatically. If your database size is inflated due to constant transactions, you should run the Compact tool.

Syntax

SynchronizeMosaicDataset_management (in_mosaic_dataset, {where_clause}, {new_items}, {sync_only_stale}, {update_cellsize_ranges}, {update_boundary}, {update_overviews}, {build_pyramids}, {calculate_statistics}, {build_thumbnails}, {build_item_cache}, {rebuild_raster}, {update_fields}, {fields_to_update}, {existing_items}, {broken_items}, {skip_existing_items}, {refresh_aggregate_info})
ParameterExplanationData Type
in_mosaic_dataset

The mosaic dataset that you want to synchronize.

Image Service; Mosaic Layer; String
where_clause
(Optional)

An SQL expression to select which mosaic dataset items will be synchronized. If an expression is not provided, all dataset items will be updated.

SQL Expression
new_items
(Optional)

Choose whether to include new items when synchronizing, and then specify which options to update the new items with.

If you choose to use this option, the item's workspace will be searched for new data. When data is added to the mosaic dataset, it will use the same raster type as the other items within the same workspace.

  • NO_NEW_ITEMS —New items will not be added when synchronizing. This is the default.
  • UPDATE_WITH_NEW_ITEMS —Update the mosaic dataset with new items in the workspaces. Optionally, you can modify the existing items using OVERWRITE_EXISTING_ITEMS keyword in the skip_existing_items parameter.
Boolean
sync_only_stale
(Optional)

Choose whether to update mosaic dataset items where the underlying raster datasets have been modified due to synchronizing. For example, building pyramids or updating the georeferencing of the rasters will affect how the overviews are rendered.

  • SYNC_STALE —Only update the items where the underlying raster datasets have been modified. This is the default.
  • SYNC_ALL —Update all of the items in the mosaic dataset.
Boolean
update_cellsize_ranges
(Optional)

Choose whether to update the cell size ranges.

  • UPDATE_CELL_SIZES —Recalculate the cell size for the entire mosaic dataset, but only for items that have an invalid visibility. This is the default.
  • NO_CELL_SIZES — Do not recalculate the cell size ranges.
Boolean
update_boundary
(Optional)

Choose whether to update the boundary.

  • UPDATE_BOUNDARY — The boundary will be rebuilt after the mosaic dataset is synchronized. Use this option if syncing will change the extent of the mosaic dataset. This is the default.
  • NO_BOUNDARY — The boundary will not be rebuilt.
Boolean
update_overviews
(Optional)

Choose whether to update any obsolete overviews. The overview becomes obsolete if any underlying rasters have been modified due to synchronizing.

  • NO_OVERVIEWS — The overviews will not be rebuilt. This is the default.
  • UPDATE_OVERVIEWS — The affected overviews will be rebuilt after the mosaic dataset is synchronized.
Boolean
build_pyramids
(Optional)

Choose whether to build pyramids for the specified mosaic dataset items. Pyramids can be built for each raster item in the mosaic dataset. Pyramids can improve the speed at which each raster is displayed.

  • NO_PYRAMIDS —Pyramids will not be generated. This is the default.
  • BUILD_PYRAMIDS — Pyramids will be generated for all the raster items that were updated due to synchronization.

Pyramids will not be built for items that were added due to synchronization.

Boolean
calculate_statistics
(Optional)

Choose whether to calculate statistics for the specified mosaic dataset items. Statistics are required for your mosaic dataset when performing certain tasks, such as applying a contrast stretch.

  • NO_STATISTICS —Statistics will not be calculated. This is the default.
  • CALCULATE_STATISTICS — Statistics will be calculated for the mosaic dataset items that were updated due to synchronization.

Statistics will not be built for items that were added due to synchronization.

Boolean
build_thumbnails
(Optional)

Choose whether to build thumbnails for the specified mosaic dataset items. 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 item description.

  • NO_THUMBNAILS —No thumbnails will be created or updated. This is the default.
  • BUILD_THUMBNAILS —Thumbnails will be generated or updated for all the raster items that were updated due to synchronization.

Thumbnails will not be built for items that were added due to synchronization.

Boolean
build_item_cache
(Optional)

Choose whether to build a cache for the specified mosaic dataset items. A cache can be created when you've added data using the LAS, Terrain, or LAS Dataset raster types. Items can also be cached using the Cached Raster function.

  • NO_ITEM_CACHE —No cache will be created or updated. This is the default.
  • BUILD_ITEM_CACHE —The cache will be generated or updated for all the raster items that were updated due to synchronization.

The cache will not be built for items that were added due to synchronization.

Boolean
rebuild_raster
(Optional)

Choose whether to rebuild the raster items from the data source using the original raster type.

  • REBUILD_RASTER —Rebuild the rasters from the source data. You will lose any changes that you have performed on selected items in the mosaic dataset. This is the default.
  • NO_RASTER —Do not rebuild the rasters. Other primary fields are reset if the update_fields parameter is set to UPDATE_FIELDS.

This will only affect items that will be synchronized. This parameter is not applicable if the new_items parameter has been set to UPDATE_WITH_NEW_ITEMS.

Boolean
update_fields
(Optional)

Choose whether to update the fields within the table. This will only affect items that will be synchronized.

  • UPDATE_FIELDS —Update the fields from the source files. This is the default.
  • NO_FIELDS —Do not reset the fields within the table from the source.

If you choose to update the fields, you can control which fields are updates by specifying them in the fields_to_update parameter. If you have made edits to some of the fields, you may want to remove them in the fields_to_update parameter.

Boolean
fields_to_update
[field_to_update,...]
(Optional)

Specify which fields should be updated.

This parameter is only valid if the option for the update_fields parameter is set to UPDATE_FIELDS.

If you have made edits to some of the fields, you may want to make sure they are not listed.

The RASTER field can be refreshed, even if the REBUILD_RASTER is not specified. However, if REBUILD_RASTER is specified, the RASTER field is rebuilt, even if this field is not specified.

String
existing_items
(Optional)

Choose whether you would like to update existing items within your mosaic dataset.

If you choose this option, you can then choose which existing parameters you would like to update: sync_only_stale, build_pyramids, calculate_statistics, build_thumbnails, build_item_cache, update_fields, or fields_to_update.

  • UPDATE_EXISTING_ITEMS —Existing items will be updated with the parameters that you have chosen to update. This is the default.
  • IGNORE_EXISTING_ITEMS —Existing items will not be updated.
Boolean
broken_items
(Optional)

Choose whether you want to remove any broken links.

Make sure that all your network connections are working properly—this tool will remove any items that cannot be accessed.

  • IGNORE_BROKEN_ITEMS —Items that have broken links will not be removed from the mosaic dataset. This is the default.
  • REMOVE_BROKEN_ITEMS —Items that have broken links will be removed from the mosaic dataset.
Boolean
skip_existing_items
(Optional)

If UPDATE_WITH_NEW_ITEMS is specified in the new_items parameter then you can also choose whether to skip or to update existing mosaic dataset items with the modified files from disk.

  • SKIP_EXISTING_ITEMS —While adding new mosaic dataset items, the tool will not update existing mosaic dataset items. This is the default.
  • OVERWRITE_EXISTING_ITEMS —While adding new mosaic dataset items, the tool will update existing mosaic dataset items that correspond to modified files on disk.
Boolean
refresh_aggregate_info
(Optional)

Choose whether to re-include data that may have been removed from the mosaic dataset.

  • NO_REFRESH_INFO —When synchronizing, do not include any rasters that may have been removed from the mosaic dataset. This is the default.
  • REFRESH_INFO —When synchronizing, include rasters that may have been removed from the mosaic dataset.
Boolean

Code sample

SynchronizeMosaicDataset example 1 (Python window)

This is a Python sample for SynchronizeMosaicDataset.

import arcpy
arcpy.SynchronizeMosaicDataset_management(
    "c:/data/syncmd.gdb/md", "Year>1999", "NO_NEW_ITEMS", "SYNC_STALE",
    "#", "#", "#", "NO_PYRAMIDS", "NO_STATISTICS", "NO_THUMBNAILS", 
    "NO_ITEM_CACHE", "NO_RASTER", "NO_FIELDS", "#", "#")
SynchronizeMosaicDataset example 2 (stand-alone script)

This is a Python script sample for SynchronizeMosaicDataset.

# Synchronize source and add new data

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

mdname = "syncmd.gdb/mdnew"
query = "#"
updatenew = "UPDATE_WITH_NEW_ITEMS"
syncstale = "SYNC_STALE"
updatecs = "#"
updatebnd = "#"
updateovr = "#"
buildpy = "NO_PYRAMIDS"
calcstats = "NO_STATISTICS"
buildthumb = "NO_THUMBNAILS"
buildcache = "NO_ITEM_CACHE"
updateras = "NO_RASTER"
updatefield = "NO_FIELDS"
fields = "#"

arcpy.SynchronizeMosaicDataset_management(
    mdname, query, updatenew, syncstale, updatecs, updatebnd, 
    updateovr, buildpy, calcstats, buildthumb, buildcache,
    updateras, updatefield, fields)

Environments

  • Extent
  • Pyramid
  • Raster Statistics
  • Parallel Processing Factor

Licensing information

  • ArcGIS for Desktop Basic: No
  • ArcGIS for Desktop Standard: Yes
  • ArcGIS for Desktop Advanced: Yes

Related topics

  • An overview of the Raster toolset
  • Environment settings for raster data
  • Synchronizing a mosaic dataset
  • Analyzing a mosaic dataset

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal