[Tilecache] TileCache to TMS URL format

Jacob Marble jacobmarble at gmail.com
Mon Jan 11 13:56:11 EST 2010


OK, I just did this over the weekend, so it might not be 100%, but
here you go.  I am using tilecache as FastCGI server whose url is
http://localhost/tilecache.fcgi.  A symlink http://localhost/tc points
to /var/tilecache.  tms_type=google changes the y to count tiles from
the top, not the bottom (a la Google Maps API).  GoogleDisk
configuration is exactly the same as Disk.  The cache location is now
/var/tilecache/yourLayer/z/x/y.png

tilecache.cfg:
[cache]
type=GoogleDisk
base=/var/tilecache
[DEFAULT] # everything in this section applies to all layers, unless
they specify
srs=900913
tms_type=google
[yourLayer]
...

httpd.conf:
<Location /tc>
        Options FollowSymLinks
        RewriteEngine On
        RewriteCond %{REQUEST_FILENAME} !-s
        RewriteRule /tc/(.*\.png) /tilecache.fcgi/1.0.0/$1 [P]
</Location>

On Mon, Jan 11, 2010 at 6:08 AM, Tyler Durden <tylersticky at gmail.com> wrote:
> Hi,
> I'm using a layer in OpenLayers that makes requests with the TileCache
> format. And I want to redirect(in my webserver) to a TMS server as
> fallback when the file(tile) does not exists in the cache.
>
> Example:
> http://myserver/cache/base/00/000/000/037/000/000/049.png
> to
> http://myserver/1.0.0/base/0/37/49.png
>
> There's a way(algorithm) for converting this URL's in Python or something else?
>
> Thanks,
> Tyler
> _______________________________________________
> Tilecache mailing list
> Tilecache at openlayers.org
> http://openlayers.org/mailman/listinfo/tilecache
>



-- 
Jacob Marble
435 760 4321
jacobmarble at gmail.com



More information about the Tilecache mailing list