HomePage: http://tilecache.org/

Author: TileCache Contributors

Download: https://pypi.python.org/packages/source/T/TileCache/tilecache-2.11.tar.gz

 Getting Started

Cache and serve map tiles

:Author: labs@metacarta.com
:Copyright: (c) 2006-2010 TileCache Contributors
            Distributed under the BSD license.
:Version: 2.11 
:Manual section: 8
:Manual group: GIS Utilities

TileCache is a BSD licensed tile caching mechanism.  The goal is to make it
easy to set up a WMS or TMS frontend to any backend data services you might be
interested in, using a pluggable caching and rendering mechanism. 

TileCache was developed by MetaCarta Labs and released to the public under a
BSD license.

The TileCache was designed as a companion to OpenLayers, the BSD licensed web
mapping interface. If you are using TileCache with OpenLayers, please read the
section of this readme which describes how to do so. For additional help with
setting up TileCache for use with OpenLayers, please feel free to stop by
#openlayers, on irc.freenode.net, or to send email to

Installing TileCache

Generally, installing TileCache is as simple as downloading a source
distribution and unpacking it. For installation systemwide, you can also use
the Python Package Index (aka pypi or Cheeseshop) to install TileCache. Simply
type easy_install TileCache. Once this is done, you will need to install the
TileCache configuration file. A tool to do this is installed, called
tilecache_install_config.py. A full installation likely looks like::
  $ sudo easy_install TileCache
  $ sudo tilecache_install_config.py
  Successfully copied file
  to /etc/tilecache.cfg.
TileCache is also available as a Debian package from the TileCache homepage.
This Debian package is designed to install on Debian etch releases or later.
This Debian package should install on Ubuntu Feisty or Gutsy.  

Running Under CGI

* Extract the code to some web directory (e.g. in /var/www).
* Edit tilecache.cfg to point the DiskCache to the location you wish
  to cache tiles, and the layers to point to the map file or WMS
  server you wish to cache. On Debian, this file is in /etc/tilecache.cfg
  by default.
* Permit CGI execution in the TileCache directory.
  For example, if TileCache is to be run with Apache, the
  following must be added in your Apache configuration,   
  where /var/www/tilecache is the directory resulting from
  the code extraction. On Debian, this is typically /usr/lib/cgi-bin.

    <Directory /var/www/tilecache>
         AddHandler cgi-script .cgi
         Options +ExecCGI

* Visit:
* Or visit:


* If you see a tile you have set up your configuration correctly. Congrats!

Non-standard Python Location
If your Python is not at /usr/bin/python on your system, you will need to
change the first line of tilecache.cgi to reference the location of your Python
binary. A common example is:



Under Apache, you might see an error message like:


    [Wed Mar 14 19:55:30 2007] [error] [client] (2)No such file or 
      directory: exec of '/www/tilecache.cgi' failed

to indicate this problem.

You can typically locate where Python is installed on your system via the
command which python.

Windows users: If you are using Windows, you should change the first line 
of tilecache.cgi to read:


    #!C:/Python/python.exe -u

C:/Python should match the location Python is installed under on your 
system. In Python 2.5, this location is C:/Python25 by default.  

Running Under mod_python

* Extract the code to some web directory (e.g. /var/www).
* Ed