Skip To Content

Cached image service creation

Complexity: IntermediateData Requirement: Use your own data

The best way to create image services that draw rapidly is to cache them. When you cache an image service, the ArcGIS Server site draws the image at a set of scale levels and pixel sizes that you define and saves the preprocessed (cached) images. When the ArcGIS Server site receives a request for an image, it can return the cached images in less time than it takes to draw the original image again.

Caching is appropriate for image services that don't change often. If they do change, there are tools available to update the cache.

Creating an effective image service cache requires you to do some design and authoring work before you build the cache. You can create an image service from a mosaic dataset, a raster dataset, or a layer file referencing a raster dataset or mosaic dataset.

The sections below summarize the process of planning for and authoring an image service, publishing a cached image service, and testing it.

Before you begin

If you will publish a cached image service from a mosaic dataset or mosaic dataset layer, the ArcGIS Server site to which you publish must have the ArcGIS Image Server. This is not required if you will publish a raster dataset or raster dataset layer.

The ArcGIS Server site must have access to the data. To learn how to make the data in the image service available to the site, see Make your data accessible to ArcGIS Server.

Cached image service authoring

When you cache an image service, ArcGIS Server draws it at a set of scales or pixel sizes that you select. Once an image service is cached, you cannot change the way it looks unless you re-create or update the cache. Therefore, do the following when preparing the data for publishing a cached image service:

  • Ensure that the image data looks good and displays the correct raster at each scale level before you cache it.

    A cached image service must be designed for every scale that you cache. Each image service has its own set of properties, such as the mosaic method. The mosaic method determines which rasters are selected for mosaicking and will be displayed at each scale level.

  • Determine the scale levels and pixel sizes you will choose for the cache.

    If you pick too few scales, users may feel that they are missing information or cannot get a good view of the image service. If you pick too many scales or pick scales that are unnecessary, you increase the cache creation time and required storage space. Conversely, your organization may have already determined a tiling scheme to use when caching. A tiling scheme determines certain properties of your cache, including which scale levels and pixel sizes to create.

    Note:

    When a mosaic dataset is used as the source of an image service, it is better to note the number of levels that the mosaic dataset source contains so that you select the appropriate scale levels or pixel sizes when defining the tiling scheme. You can identify the number of levels by looking at the cell size level table of the mosaic dataset.

  • Ensure that the source data is stored in the same coordinate system as the image service you publish.

    For example, if you know you will be publishing a cached image service using the ArcGIS Online/Bing Maps/Google Maps tiling schema, create the mosaic dataset using the WGS 1984 Web Mercator (Auxiliary Sphere) or WGS 1984 Web Mercator coordinate system, because that is the coordinate system used by that tiling schema.

    You cannot change the projection of a mosaic dataset, so if the source mosaic dataset uses a different projection than the one you use for caching, create a referenced mosaic dataset from the mosaic dataset in the projection you need.

See Preparing image services for more information on designing the source dataset and image service.

Cached image service publishing

You can publish a cached image service from ArcGIS Pro. See Share a web imagery layer and Configure a web imagery layer for instructions.

Factors that affect the time it takes to publish a cached image service include the largest scale you set for the cache, the hardware comprising the ArcGIS Server site to which you publish, and the extent of the data.

Test the cache

Once the cache is built, you can test it in a web application to ensure that the image service appears and performs the way you expect.

You can open the image service in a web application. The following steps describe how to open the image service in the ArcGIS Maps SDK for JavaScript viewer application available through the ArcGIS Server Services Directory:

  1. In a web browser, browse to the Services Directory. For example, https://gisserver.domain.com:6443/arcgis/rest/services.
  2. In the services list, click the image service.

    All image service URLs are appended with the text ImageServer. If the image service resides in a folder other than the root folder, browse to that folder and select the service.

    A page appears that shows the name of the service, a service description, and a list of layers in the service.

  3. Click View In: ArcGIS JavaScript.

    The service opens in the ArcGIS Maps SDK for JavaScript viewer.

  4. Pan around the image service and zoom to different scales.

    When panning and zooming in the image service, you should see the image tiles appear without much delay. Confirm that the imagery draws at all scales you expect.

Troubleshooting

If it doesn't appear that the application is using the cache, make sure that the ArcGIS Server account has read and write permissions to your server cache directory.

If you're using Mozilla Firefox to view your web application, there's an easy way to tell if your cache tiles are being used.

  1. Right-click inside the web application and choose View Page Info.
  2. In the Page Info window, click the Media button.
  3. Examine the images that appear in the list. If you see URLs referencing your server cache directory, you know your cache is being used.