In ArcGIS Server map caches, the tiling scheme defines how the map is broken up into a grid for creating tiles. Today’s post gives some of the terms you need to know when working with the tiling scheme. An upcoming post will discuss how to work with the tiling scheme programmatically.
Tiling scheme origin
The tiling scheme origin is the upper-left corner of the tiling scheme grid. The tiling scheme origin doesn’t usually represent the point where tiles begin to be created. Tiles are only created when the upper-left corner of the map, or map origin, is reached. In the diagram below, notice that the tiling scheme origin defines where the grid begins, but tiles are only created in the parts of the grid that cover the Full Extent of the map.
In most cases, you should keep the default tiling scheme origin chosen by the software. The default is the upper-left point of the coordinate reference defined by the map document. If no coordinate reference is defined in the map document, the tiling scheme origin defaults to a point far beyond the upper-left of the extent of all of the layers in the map.
If you change the tiling scheme origin to something other than the default, be aware that tiles can be created only in the map area to the lower-right of the tiling scheme origin. If you want to cache only a certain area of your map, creating your cache based on a custom full extent is a better option than changing the tiling scheme origin.
Using a common tiling scheme origin for all of your caches ensures that your caches can overlay each other successfully in Web applications.
Tile width and height
The default tile width and height is 512 pixels. You can choose any width and height that is a power of 2, but it’s recommended that you use 128, 256, or 512. If you are building a cache that will overlay another cache, be sure to use the same tile width and height for both caches.
Choosing a smaller tile width and height may improve performance of the application requesting tiles from the cache, as less data will need to be transferred. However, smaller tile size results in a larger cache size and longer creation time. Because the default Windows disk block size is 4 kilobytes (k), small tiles that may only be 1k in size will actually use 4k. A larger tile might be 4k in size and fit perfectly in a 4k block. Therefore, four 1k tiles use 16k on disk, whereas the single 4k tile covering the same area only uses 4k on disk. With large numbers of tiles, this difference can become significant.
The above image demonstrates how smaller tiles can require exponentially more size on disk than larger tiles.