Skip To Content

Map caching based on feature boundaries

In this topic

ArcGIS allows you to spatially constrain tile creation to the boundaries of a feature class. There are two places you can specify this feature class:

  • When you publish a service or first initialize a cache, set the Area of interest to cache parameter on the Caching > Advanced Settings tab of the Service Editor. From the drop-down list, choose Import from a feature class. This area of interest only applies if you have chosen to build the cache automatically when publishing.
  • Open the Manage Map Server Cache Tiles tool and set the Area Of Interest parameter. This setting overrides any area of interest that you may have set in the Service Editor.

If you're running the Manage Map Server Cache Tiles tool in ArcMap, you also have the option to sketch an area of interest on the screen. This is helpful for one-time runs of the tool where you are trying to patch missing tiles in a known area of the cache or ensure coverage in a given area. However, for most structured caching jobs or updates, it's recommended that you supply a feature class.

Caching by feature class boundary allows you to create tiles only in the places where you need them, avoiding empty or uninteresting areas. For example, if you are caching a country, you might supply a feature class of major urban areas. By doing so, you are requesting that the server only precreate tiles that cover those urban areas. The rest of the areas can be cached on demand when requested by clients. This can save you time and disk space that would be consumed by creating unneeded tiles in rural areas.

The image below shows a theoretical grid of tiles that would be created if the feature class contained just the state of California. The feature class helps you avoid creating unneeded tiles in the ocean and in neighboring states. These unneeded tiles would have been included if the default rectangular extent were used.

Illustration of tile creation based on feature boundaries

Supported shape types

You must use a polygon feature class to define your area of interest. If you want to build or update a cache based on a point or polyline feature class, you must first buffer the features by a small amount to get a polygon feature class. It's also recommended you dissolve and generalize the buffers before using them as your area of interest.

Since points contain only one vertex, they can often be drawn quickly through a dynamic map service or client-side graphics (like a feature layer in the Esri web mapping APIs). After testing performance, you may find that you do not need to cache your points at all.

Best practices

The following tips will help you efficiently create caches based on a feature class:

Only cache by feature class at large scales

At small scales, you create relatively few tiles, so it doesn't make much difference whether you cache by feature class or not. Creating all tiles at small and medium scales ensures that as users open your map and begin zooming in, they don't miss any tiles or have to create any tiles on demand.

To minimize duplicate labeling, the caching tools draw an image of a large area, or supertile, before cutting the image into tiles of the size you requested. When the map service uses antialiasing, the supertile is 2048 x 2048 pixels; otherwise, it's 4096 x 4096. When your feature intersects the boundary of a supertile, that entire supertile must be created. This means it takes some zooming in before caching by feature class begins to have a real effect in saving time and disk space. If your features are numerous and all over the map, you might not get much benefit from caching by feature class because most of your features will intersect a supertile.

Generalize feature boundaries

Too many vertices in the feature class can slow down the caching tools, but fortunately, you don't need to have a lot of vertices. The fact that the caching tools are drawing square areas tends to blunt whatever detailed features were in the feature class. Your feature class doesn't need to include every island, wharf, and inlet.

You can use the Simplify Polygon tool to systematically remove vertices from the feature class without changing the general shape. If your feature class is derived from a model, you could put Simplify Polygon as the final step in the model. Some tools, such as Buffer, can add an excessive number of vertices to your feature class.

The images below show how very similar sets of tiles are created whether you use a detailed or a generalized feature class. The second feature class has had most of the vertices removed using the Simplify Polygon tool. The gray squares represent a 4096 x 4096 supertile at about 1:4500 scale.

Caching with a detailed feature class
Caching with a generalized feature class

In 10.0 and earlier versions, it was recommended that each feature be large enough to encompass multiple bundles of tiles in order to get the best utilization of service instances. This recommendation is no longer applicable beginning at 10.1. Also, the status tracking field available in 10.0 and earlier releases is not used beginning at 10.1. To view the completion status of your cache, right-click your service in the Catalog tree and click View Cache Status.