Caching

Caching imagery can provide increased scalability at the cost of functionality. Caching imagery essentially creates a static set of image tiles that can be used quickly as a backdrop in both web and desktop applications. Caching is often recommended for serving traditional natural color, preprocessed, and orthorectified imagery, but not for richer imagery datasets.

The advantages of caching are as follows:

  1. It is highly scalable from the server perspective, as the server only needs to return the requested tiles and performs no processing.
  2. Client applications can appear to perform better for use cases where users pan around the imagery, as each tile (specified scale and extent) is requested only once and then cached locally by the application.
  3. In cases where the original data is archived, the volume of data stored on the server is often much smaller due to compression and inherent removal of overlapping imagery.

The disadvantages of caching are as follows:

  1. When cached image services are accessed, they are static and do not allow the following features:
    • Access to data values required for analysis and more advanced queries
    • Change of compression for transmission, which enables balance of bandwidth utilization and quality
    • Queries that restrict access to only selected images
    • Use of mosaic rules to reorder the imagery
  2. The quality of cached imagery is generally lower than that of dynamic image services because the imagery is sampled multiple times and compressed.
  3. Caching can put more demand on the client application because it needs to locally store and manage the cache. For web applications this is not an issue, since web browsers handle caching well.

There are two key methods by which imagery can be served as cache:

Cached map services

Mosaic datasets (or image services) can be converted into a cache and then served as cached map services. Caching imagery can be done in three ways:

  1. Turn on caching when publishing an image service.
  2. Directly cache a raster dataset or mosaic dataset (this was added in ArcGIS 10.1 for Desktop SP1).
  3. Add a raster dataset or mosaic dataset to a map and cache the map. Note that this method is generally not as efficient and has some disadvantages. When maps are cached, the smallest scales are cached first, then the larger scales. For imagery, it is more efficient to cache the larger scales and then generate the smaller scales often by subsampling the larger scales.

Serving the cache as a map service can be achieved as follows:

Cached image services

Caching can be enabled on an image service during the publishing process. In this case the service appears as both a tiled map service and an image service, and applications can make both cached tile requests and image service requests. The typical use case is that the applications initially make tile requests to provide a common static view of the services, but users can still make queries and use the more advanced capabilities of an image service, as the applications can change to make image service requests. The disadvantage of creating such a service is that the additional space is required to store the cache in addition to potentially large amounts of processing to generate the cache. This disadvantage can be mitigated by using the on-demand caching capability. The cache is typically pregenerated for the smaller scales or areas of expected demand. The remaining cache is only generated on demand when the first user accesses any area at a larger scale. On-demand caching has the most value in applications such as emergency response, where high demand for specific areas can be expected.

Using caches as overviews

In cases where all the imagery in an image service is 3-band (RGB) 8-bit imagery, it is possible to use a cache in place of overviews. In such workflows, no overviews are created for the mosaic dataset. Instead, a cache is created, but the lowest pixel size (largest level) of the cache is set to the appropriate scale (or pixel size) at which the overview should be created. The cache is then generated using either ArcGIS Server or ArcGIS Desktop.

Then the cache is added back into the mosaic dataset using the Raster Dataset raster type, and the minimum and maximum pixel sizes are set appropriately for the required smaller scales.

10/28/2013