Skip To Content

Export and import map caches

ArcGIS includes two geoprocessing tools that help you transfer sets of tiles from one cache to another: Export Map Server Cache and Import Map Server Cache, both in the Server Tools toolbox. They are useful for collaborative caching jobs where different organizations contribute tiles to one primary cache. These tools can also be used to move subsets of tiles to machines for offline use.

Import and export scenario for cache tiles
Cache tiles can be exported for access as raster datasets and, optionally, imported into other caches.

Cache tiles can also be exported to be accessed as raster datasets and imported into other caches.

When to use the export and import tools

The following scenarios provide examples of how you can use the Export Map Server Cache and Import Map Server Cache geoprocessing tools.

Best-available cache

Suppose you're in charge of maintaining an imagery cache for your state. One of the counties in your state has new high-resolution imagery that it wants to contribute to your cache. You ask the county to export its cache to an external hard drive or an accessible network location where you can retrieve the exported tiles. You then import the tiles into the state cache.

Collaborative cache

The best-available cache idea can be extended to multiple contributors. Imagine you're coordinating a web mapping project for an association of several local governments in your region. Each local government has its own GIS database and mapping applications; however, all have agreed on a matching cartographic style and cache tiling scheme.

In this scenario, you decide to build a collaborative cache made of tiles from each local government. Each local government exports the cache tiles that fall within its boundaries. You then import these tiles into one primary cache for your web map. Members of the public who view the map on the internet may not even recognize that the data came from different sources.

Disconnected cache

ArcGIS apps can read tile caches from disk as if they were any other raster dataset. There is no need for a supporting map service. In this scenario, you move subsets of tiles to other machines for offline use.

Suppose you work for a large city and you've set up a cached map service with imagery. Your employees like to use this service in maps to give context to their work. However, some of the employees must occasionally take laptops onto job sites where internet access is not available.

You decide to export a copy of the cache to a shared location on the network. Your employees can now import tiles from this location onto their laptops. To avoid getting more tiles than they need, the employees create a feature class of their area of interest and use it to define the import area. When the employees open the map on the laptops, they browse to the imported cache and add it to the map as they would with other raster datasets.

Export and import tiles

The workflow for exporting and importing tiles includes the following steps:

Export a set of tiles

The first step is to export tiles from the source cache using the Export Map Server Cache tool. Optionally, define an area of interest to constrain the boundaries of the export. In this way the tools give you an advantage over copying and pasting tiles. With copy and paste, it would be difficult to spatially isolate a subset of tiles to an area of interest.

When you export based on a feature class boundary, the exported area is essentially clipped to the boundary of the feature class. Areas outside the feature class boundary on peripheral tiles are made transparent (if the source cache is PNG or MIXED) or have the background color burned in (if the source cache is JPEG).

The source destination can be a shared location on the network, a web-enabled folder, an occasionally disconnected laptop, or a piece of hard media. Check the Copy data from server box if the ArcGIS Server account doesn't have write access to the target destination, which might happen in cloud computing scenarios. This puts the tiles in the server output directory, from which the client then downloads them. This option is slower, but it opens up your export to a wider variety of clients.

The tiling scheme and basic cache dimension information are exported with the tiles in the conf.xml and conf.cdi files, respectively. These files are essential for clients such as ArcGIS Pro to retrieve basic information about the cache.

Finally, Export Map Server Cache allows you to convert between cache storage formats (compact and exploded). This is necessary because you cannot mix storage formats in a cache. If you export large tile sets that will be copied to disconnected environments, use the compact format. The compact format takes less disk space and allows for much faster copying than the exploded format.

Optionally, use the tiles as a disconnected raster dataset

Once you export tiles, you can choose to use them directly from disk as a raster dataset in ArcGIS Pro. Click Add Data and browse to the location where you exported the tiles. Many workflows will not need this step, but it is an option. Optionally, stop here and choose not to import the tiles anywhere else.

Optionally, Import the tiles into another cache

The Import Map Server Cache tool brings an exported set of tiles into an existing cache. The tiling scheme of the caches must match. The image format of the caches must also match or the receiving cache must use the mixed image format.

Optionally, define an area of interest for the import. This is useful if someone has exported an entire cache and you only want to retrieve a specific part of it.

If the ArcGIS Server account doesn't have read access to the source cache, check Upload data to server. This puts the tiles into the server system directory. The server then automatically moves the tiles into the server cache directory.

Image format importance

When importing tiles from one cache to another, the cache image formats must match.

When possible, use PNG or mixed caches when you export and import tile caches. JPEG caches cannot recognize the background color of a tile as transparent. If you must use JPEG tiles that contain a background color, be aware that the background color of those tiles will be introduced into the receiving cache. If the target cache has a different background color to begin with, importing will cause the target cache to have two background colors.

Choose whether to merge or overwrite tiles

When tiles are exported or imported into a cache, transparent pixels in the originating cache are ignored by default. This results in a merged or blended image in the receiving cache. For example, you can import tiles with point and line features into a basemap cache without overwriting the basemap image.

In some scenarios where a blended image would not be appropriate, you can force the import or export to replace all pixels in the area of interest. To do this, check the Overwrite Tiles box when you run the export or import tools. Be aware that if the originating cache contains transparent pixels, the receiving cache will also become transparent in those areas.

This choice is irrelevant with JPEG caches, which do not support transparent pixels.