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

Josh Doe josh at joshdoe.com
Sat Mar 19 01:03:42 EDT 2011


I've added this to my fork [1]. Nothing like learning
Python+Mercurial+pip/venv+Bitbucket all at once. In the end it's a
trivial patch however, but could be useful to others.

-Josh

[1]: https://bitbucket.org/joshdoe/mapproxy-arcgiscache

On Thu, Mar 17, 2011 at 2:18 PM, Josh Doe <josh at joshdoe.com> wrote:
> 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