Yovavzsystematics-co-il-esridist

Create Cache and TPK without ArcGIS for Server - Workflows for Desktop users

Blog Post created by Yovavzsystematics-co-il-esridist Employee on Aug 26, 2014

Many current ArcGIS environments need or enable utilizing Cache or Tile packages (TPKs), most of them are NOT including ArcGIS for Server in its infrastructure.

Runtime Apps, ArcGIS Online Tiles Services (potential to save valuable credits), Collector in Offline mode and even ArcMap/Scene/Globe - they all can benefit from Cache/TPKs as regard to responsiveness or background map.

In this post I'll draw the available workflows to create the Cache/TPK files without the need for ArcGIS for Server.

The post doesn't explain how to prepare an ArcMap document (mxd) for Cache/TPK craeation. This issue will be addressed briefly.

The post refers to ArcGIS for Desktop Ver. 10.1 or higher (one workflow only work on Ver. 10.2).

There are 3  optional Cache/TPK creation workflows:

  1. Tile Cache Tool-set from Arc Toolbox
  2. Share as Tile Package in ArcMap
  3. Using Create Map Tile Package Tool in ArcMap

 

The workflows functionality is summarized in the following table:

 

Workflow

Min. Desktop

Ver.

Best

serves

Embedded

Legend

Creation

Multithreading

Processing

Anti aliasing

Caching ECW RastersWizardCache/TPK

scales

Control

Automation potential
Tile Cache Toolset10.2.x

Rasters

(imagery)

XXXBothBoth
Share as Tile Package10.1.xVector MapsXTPK

Max Level

only

X
Create Map Tile Package Tool10.1.xVector MapsXXTPK

Max Level

Only

 

 

Building Arc Map Project for caching

There are many considerations when you're building an mxd for caching. Here you can find some tips.

I tried to gather some of the most useable:

  1. Define the Data Frame's Coordinate system that match the Tiles Cache/TPK purpose (e.g. For ArcGIS Online, use Web Mercator).
  2. Define the Data Frame's Full Extent parameter to fit tightly to your Area of Interest.
  3. Define the scales for the intended cache - usually the ArcGIS Online Scheme is used. These scales will be part of the tiling scheme for the cache.
  4. Build the project with group layers for each scale and give the appropriate scale range to the group (not the layers).
  5. Put only relevant Layers in each group layers. It's recommended to use definition queries in order to avoid data multiplication.
  6. For Vector feature classes, pay attention to appropriate symbology and labels that match the scale of its group.
  7. For imagery, its recommended to use Display resample method of Bilinear interpolation and Histogram Stretch type of Minimum-Maximum or None.

You can find good examples for such projects in the Local Government Basemaps

Tiling Scheme

Every cache is based on a tiling scheme. This scheme defines the tiles parameters such as tile format, storage format, tile size, scale levels and so on.

The Default for the workflows is the ArcGIS Online Scheme. You can create a custom Tiling Scheme that fits best your needs with the Generate Tile Cache Tiling Scheme Tool

Tiles image formats

The cache tiles image formats are set in every Tiling Scheme. these formats are variants of PNGs and JPGs.

the thumb rules for deciding are:

  1. For Vector based caches - PNG (sets bit depth automatically)
  2. For Raster based caches with rectangular extent - JPG with 55% quality (Use MIXED for irregular extents or whenever you need transparency when there's NoData).
  3. For imagery and vector/labels based cache - MIXED with 90% quality. Preferably, if possible create 2 congruent caches - one for the imagery and one for the vectors/labels.

Tile Cache Tool-set workflow

The following workflow mostly fits Ver. 10.2.x (and above), due to a change made to the Manage Tile Cache tool done in Ver. 10.2. That change enabled inserting an mxd file as an input.

This workflow is recommended for imagery caches due to the Parallel processing ability of the tools used. That ability makes it very efficient and shortens processing time significantly. In many cases, it's more powerful workflow then on the organization's ArcGIS For Server, due to lesser core number allowed on the server, compering to the Desktop. It also has an automation ability(Such as Model/Script).

Warning!: This workflow is extremely sensitive to communication speeds - it's highly recommended to to work on local files (especially with Rasters/Mosaics). Caching network files (not stored on the caching computer) may result artifacts, empty tiles etc.

This workflow steps are:

  1. Prepare a cache suitable ArcMap document and save it.
  2. Optionally, create a custom Tiling Scheme, using the Generate Tile Cache Tiling Scheme Tool (ArcToolbox-->Data Management Tools --> Tile Cache). This step is only necessary if you don't use the default ArcGIS Online Tiling Scheme.
  3. Run the Manage Tile Cache Tool to create the cache (ArcToolbox-->Data Management Tools --> Tile Cache). Besides mxd file (ArcMap Document), the input source can also be Raster or Mosaic Dataset. Typically, you should make sure you set the Minimum/Maximum Cached Scales to fit the desired Tiling Scheme and that all scales are checked. In the Tool Environments you can define the Parallel Processing Factor. For some reason, the Area Of Interest Parameter doesn't do the job - If a mask is needed, continue to the next step. This tool may also work on Raster or Mosaic Dataset instead of mxd.
  4. For TPK creation and/or for masking/clipping the cache, run the Export Tile Cache Tool (ArcToolbox-->Data Management Tools --> Tile Cache). The Export Cache As parameter defines if the output will be TPK or Cache. In this Tool the Area Of Interest Parameter does the job well and you can also utilize Parallel Processing factor.
  5. Optionally, If you need to upload your TPK to ArcGIS Online, you can run the Share Package Tool (ArcToolbox-->Data Management Tools --> Package). The tool is highly recommended for large TPKs.

Share as Tile Package workflow

The following workflow mostly fits vector based caches due to the anti aliasing feature and the embedded Legend, available in ArcGIS Online Tile Service based on this workflow output.

This workflow steps are:

  1. Prepare a cache suitable ArcMap document and fill out the Map document properties (File-->Map Document Properties - Some of theme are obligatory for the workflow). After that, Save the project.
  2. Optionally, create a custom Tiling Scheme, using the Generate Tile Cache Tiling Scheme Tool (ArcToolbox-->Data Management Tools --> Tile Cache). This step is only necessary if you don't use the default ArcGIS Online Tiling Scheme.
  3. Enable ArcGIS Runtime Tools (Customize-->ArcMap Options-->Sharing). This step is vital for the next step (Needed only once for fixing it in the Normal Template).
  4. Optionally, sign in to your ArcGIS Online Organizational account (File-->Sign In).
  5. Open the "Tile Package" wizard (File-->Share As-->Tile Package) and fill it's parameters:
    1. In Tile Package Tab you can decide where to save The output TPK
    2. In Tile Format Tab you can choose the desired Tiling Scheme, Tile format and Highest Level of details (NOT the lowest).
    3. In Item Description Tab You can alter/insert The output TPK Metadata (Some of the fields are obligatory).
  6. Run Analyze command from upper right header of the wizard in order to validate the Map for any Errors and issues. No Errors are allowed when sharing. If any issues are discovered,  "Prepare" window will appear with a list of issues. You can Right-click on each message to get more info, read help for the error, and to click on suggested fixes.
  7. Run Share command from upper right header of the wizard in order to create the TPK.

Create Map Tile Package workflow

The following workflow is the same as the former one and share the same properties, except for the wizard interface and the need of a second tool to upload the output TPK to ArcGIS Online. This workflow's advantage over the former is the automation ability (Such as Model/Script).

  1. Prepare a cache suitable ArcMap document and fill out the Map document properties (File-->Map Document Properties - Some of theme are obligatory for the workflow). After that, Save the project.
  2. Optionally, create a custom Tiling Scheme, using the Generate Tile Cache Tiling Scheme Tool (ArcToolbox-->Data Management Tools --> Tile Cache). This step is only necessary if you don't use the default ArcGIS Online Tiling Scheme.
  3. Run the Create Map Tile Package Tool to create the TPK (ArcToolbox-->Data Management Tools --> Package). You can choose the appropriate Tiling Scheme and Tile Format, Choose Highest Level of details (NOT the lowest) and insert/alter Summary and Tags.
  4. Optionally, If you need to upload your TPK to ArcGIS Online, you can run the Share Package Tool (ArcToolbox-->Data Management Tools --> Package). The tool is highly recommended for large TPKs.

 

Resources

ArcGIS For Desktop Documentation

Outcomes