1

Trying to take an exploded ESRI tile cache and serve the PNG images on a cloud storage space. I want to be able to generate the tile caches from ArcMap (from rasters and mosaic datasets), but serve them as tiles that don't require an ArcGIS Server service. Problem is there will be hundreds of these rasters each requiring a separate service.

It seems that the folder structure that ESRI uses is different than the standard slippy map structure. Not sure if there is any documentation on it.

http://[abc].tile.openstreetmap.org/zoom/x/y.png
https://{subDomain}.tile.openstreetmap.org/{level}/{row}/{col}.png

Example of the ESRI tile cache structure. The row folders aren't named with simple integers like in OpenStreetMap. Seems to use hexadecimal numbers instead.

L10
    R0000015c
        C000000b0.png
        C000000b1.png
        C000000b2.png
    R0000015d
L11
L12
L13
L14
L15
L16

The WebTileLayer from the ArcGIS API for JavaScript doesn't work with non-ArcGIS Server map files. https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-WebTileLayer.html

How can tiles from an ESRI TileCache be served up just as a folder of images without a service?

1 Answer 1

0

I ended up writing a Python script that loops through all the folders using os.walk

for path, dirnames, files in os.walk(startfolder):
  basepath = os.path.basename(path)
  if basepath[:1] == 'R':

First strip off the 'R' character in front of the folder names. These are the rows. Slicing off the first character, then can convert from hexadecimal to base 10 integer.

name_int = int(basepath[1:], 16)

Then rename the folder with os.rename

Repeat for the PNG filenames which are prefixed by 'C'

Once the entire folder structure and files are renamed, the entire folder structure can be put on cloud storage and served up on a map using WebTileLayer

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.