palavido

Creating a Tile Cache or Package that is Visible at All Scales

Blog Post created by palavido on Jul 18, 2014

I've been playing around with Collector for ArcGIS on iOS devices over the past few weeks and have learned quite a bit. One thing of particular interest to me is using our own custom imagery on our devices. Our water district covers a fairly large geographic area (roughly 1100 square miles) and I wanted to be able to load imagery for the entire area onto a device in one fell swoop (i.e. not having the user have to download and area of interest each time they go out). We were running into a few roadblocks in accomplishing this.

 

First, as mentioned, our district covers a very large area. The aerial photography we have is pretty detailed, 3 inch per pixel resolution in some areas and 6 inch per pixel in the remaining areas. Creating a tile cache or tile package to provide imagery down to the 1:1,128 scale (Level 19 in the ArcGIS Online tiling scheme) produced a tile package on the order of 167 gb. Obviously too big to load onto an iOS device.

 

The next thing we tried was to reduce the number of scale levels in the cache to reduce the overall tile cache size. We choose to generate tiles only as far as 1:4,513 (i.e. Level 17 in the ArcGIS Online tiling scheme). While this created a much more manageable cache and package size, one that could be loaded via iTunes onto the iOS device, we were running into the issue of the imagery disappearing in Collector once you zoomed in past a scale of 1:4,513 (as was expected since no tile exist past that point).

 

While realizing that we would not have any higher resolution than the tiles generated at 1:4,513, we thought it would still be important for the user to be able to see those tiles when zoomed in beyond that scale. By default, this isn't possible (that I'm aware of anyway) using the tools in ArcToolbox or ArcMap. So here is how we worked around that to make it happen:

 

  1. Manage Tile Cache). We chose to only generate tiles to a maximum cached scale of 4513.988705 to keep the tile cache relatively small in size. ManageTileCache.png
  2. Once the tile cache is done generating, navigate to the tile cache using Windows Explorer. Drill down into the "_alllayers" folder within your tile cache folder ( i.e. [Tile Cahce Name] --> [Data Frame Name] --> _alllayers). You will notice that there are folders present for each level. In our case, we did not generate any tiles for levels past Level 17 (1:4,513) so as a result, the "L18" and "L19" folders are empty. Select those 2 folders and delete them.Delete.png
  3. Next, copy the "L17" folder twice within the "_alllayers" directory, and rename the two copies "L18" and "L19" respectively.copy.png
  4. Next, navigate up one directory to where the tile cache configuration files are stored (i.e [Tile Cache Name --> [Data Frame Name]). The first file to modify is the "conf.xml" file. In this file, find the resolution for the tiles that were generated for level 17 (highlighted in yellow) and copy that resolution (i.e. replace the existing resolution) for levels 18 and 19 (highlighted in green). Save the file. copy.png
  5. Finally, modify the "conf.properties" file and replace the "MaxScale" value with the 1128.4971760000001 (highlighted in yellow), which is the scale for Level 19. Save the file.conf.png

 

Once those steps were completed, we reviewed the Tile Cache in ArcCatalog and we can now see that the imagery stays visible at all scale levels. obviously as mentioned, the resolution does not get any better past 1:4,513, but at least the imagery does not disappear for our users when zoomed in past that scale.

review.png

Outcomes