[MapProxy] Using hex tile indices (ArcGIS tile cache)

Josh Doe josh at joshdoe.com
Thu Mar 17 14:18:26 EDT 2011


I'm trying to use MapProxy directly with an ArcGIS server tile cache,
which stores images in an unusual directory format [1].
Level/row/column are pre-pended with L/R/C, and row and column are in
hex padded to 8 characters, like L05/R00000123/C00000abc.jpg.
OpenLayers supports this [2], but I'd like to know if MapProxy would
consider supporting this scheme.

It seems it would be added to mapproxy/client/tile.py with a function
like arcgiscache_path, and a new template key added of the same name.

def arcgiscache_path(tile_coord):
   """
   >>> arcgiscache_path((1234567, 87654321, 9))
   'L09/R0012d687/C05397fb1'
   """
   return 'L%02d/R%08x/C%08x' % (tile_coord[2], tile_coord[0], tile_coord[1])

Later I might try and get MapProxy setup to try this myself, but I'm
new to Python/virtualenv and the rest, so it might take some poking
around to figure out what I'm doing.

-Josh

[1]: http://blogs.esri.com/Support/blogs/mappingcenter/archive/2010/08/20/Checking-Your-Local-Cache-Folders.aspx
[2]: http://dev.openlayers.org/docs/files/OpenLayers/Layer/ArcGISCache-js.html


More information about the MapProxy mailing list