Export Tile Cache (Data Management)

Summary

Exports tiles from an existing tile cache to a new tile cache or a tile package. The tiles can be either independently imported into other caches or accessed from ArcGIS Pro or mobile devices.

Usage

  • When exporting a tile cache as a tile package tpk file, the cache storage format is always Compact. When exporting a tile cache as a tile package tpkx file, the cache storage format is always Compact v2.

  • This tool supports the Parallel Processing environment setting.

Parameters

LabelExplanationData Type
Input Tile Cache

An existing tile cache to be exported.

Raster Layer; Raster Dataset
Output Tile Cache Location

The output folder into which the tile cache or tile package will be exported.

Folder
Output Tile Cache Name

The name of the exported tile cache or tile package.

String
Export Cache As
(Optional)

Specifies whether the cache will be exported as a tile cache or a tile package. Tile packages are suitable for ArcGIS Runtime and ArcGIS Mobile deployments.

  • Tile cacheThe cache will be exported as a stand-alone cache raster dataset. This is the default.
  • Tile package (tpk)The cache will be exported as a single compressed file (.tpk) in which the cache dataset is added as a layer and consolidated so that it can be shared easily. This type can be used in ArcMap as well as in ArcGIS Runtime and ArcGIS Mobile applications.
  • Tile package (tpkx)The cache will be exported using Compact_v2 storage format (.tpkx), which provides better performance on network shares and cloud storage directories. This improved and simplified package structure type is supported by newer versions of the ArcGIS platform such as ArcGIS Online, ArcGIS Pro 2.3, ArcGIS Enterprise 10.7, and ArcGIS Runtime 100.5.
String
Storage Format
(Optional)

Determines the storage format of tiles.

  • CompactGroup tiles into large files called bundles. This storage format is more efficient in terms of storage and mobility.
  • Compact v2 Tiles are grouped in bundle files only. This format provides better performance on network shares and cloudstore directories. If the Export cache type parameter is set to Tile package (tpkx) then the extension of the tile package is (.tpkx), which is supported by newer versions of the ArcGIS Platform such as ArcGIS Online, ArcGIS Enterprise 10.9 and ArcGIS Runtime 100.5.This is the default.
  • ExplodedEach tile is stored as an individual file. Note that this format cannot be used with tile packages.
String
Scales [Pixel Size] (Estimated Disk Space)
(Optional)

A list of scale levels at which tiles will be exported.

Double
Area of Interest
(Optional)

An area of interest that spatially constrains where tiles will be exported from the cache.

The area of interest can be a feature class or a feature that you draw on the map.

This parameter is useful if you want to export irregularly shaped areas, as the tool clips the cache dataset at pixel resolution.

Feature Set

Derived Output

LabelExplanationData Type
Output Tile Cache

The output tile cache or tile package.

Raster Layer; File

arcpy.management.ExportTileCache(in_cache_source, in_target_cache_folder, in_target_cache_name, {export_cache_type}, {storage_format_type}, {scales}, {area_of_interest})
NameExplanationData Type
in_cache_source

An existing tile cache to be exported.

Raster Layer; Raster Dataset
in_target_cache_folder

The output folder into which the tile cache or tile package will be exported.

Folder
in_target_cache_name

The name of the exported tile cache or tile package.

String
export_cache_type
(Optional)

Specifies whether the cache will be exported as a tile cache or a tile package. Tile packages are suitable for ArcGIS Runtime and ArcGIS Mobile deployments.

  • TILE_CACHEThe cache will be exported as a stand-alone cache raster dataset. This is the default.
  • TILE_PACKAGEThe cache will be exported as a single compressed file (.tpk) in which the cache dataset is added as a layer and consolidated so that it can be shared easily. This type can be used in ArcMap as well as in ArcGIS Runtime and ArcGIS Mobile applications.
  • TILE_PACKAGE_TPKXThe cache will be exported using Compact_v2 storage format (.tpkx), which provides better performance on network shares and cloud storage directories. This improved and simplified package structure type is supported by newer versions of the ArcGIS platform such as ArcGIS Online, ArcGIS Pro 2.3, ArcGIS Enterprise 10.7, and ArcGIS Runtime 100.5.
String
storage_format_type
(Optional)

Determines the storage format of tiles.

  • COMPACTGroup tiles into large files called bundles. This storage format is more efficient in terms of storage and mobility.
  • COMPACT_V2 Tiles are grouped in bundle files only. This format provides better performance on network shares and cloudstore directories. If the Export cache type parameter is set to Tile package (tpkx) then the extension of the tile package is (.tpkx), which is supported by newer versions of the ArcGIS Platform such as ArcGIS Online, ArcGIS Enterprise 10.9 and ArcGIS Runtime 100.5.This is the default.
  • EXPLODEDEach tile is stored as an individual file. Note that this format cannot be used with tile packages.
String
scales
[scale,...]
(Optional)

A list of scale levels at which tiles will be exported.

Double
area_of_interest
(Optional)

An area of interest that spatially constrains where tiles will be exported from the cache.

The area of interest can be a feature class or a feature that you draw on the map.

This parameter is useful if you want to export irregularly shaped areas, as the tool clips the cache dataset at pixel resolution.

Feature Set

Derived Output

NameExplanationData Type
out_cache

The output tile cache or tile package.

Raster Layer; File

Code sample

ExportTileCache example 1 (Python window)

This is a Python sample for the ExportTileCache tool.

import arcpy

arcpy.ExportTileCache_management(
     "C:/Data/CacheDatasets/Source", "C:/Data/CacheDatasets", 
     "Target", "TILE_PACKAGE", "COMPACT", "4000;2000;1000", "#")
ExportTileCache example 2 (stand-alone script)

This is a Python script sample for the ExportTileCache tool.

#Export tile cache for some levels to an EXPLODED format in 
#another location

import arcpy

    
cacheSource = "C:/Data/CacheDatasets/Source"
cacheTarget = "C:/Data/CacheDatasets"
cacheName = "Target"
cacheType = "TILE_CACHE"
storageFormat = "EXPLODED"
scales = "4000;2000;1000"
areaofinterest = "#"

arcpy.ExportTileCache_management(cacheSource, cacheTarget, cacheName,
     cacheType, storageFormat, scales, areaofinterest)

Environments

Parallel Processing Factor

If the Parallel Processing Factor value is empty (blank), the tool will run with a default value of 50 percent (one-half) of the available cores.

Licensing information

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

Related topics