TileCache

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

Description
===========
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
tilecache@openlayers.org. 

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
  ...
  Installed
  /usr/lib/python2.5/site-packages/TileCache-2.10-py2.5.egg
  
  $ sudo tilecache_install_config.py
  Successfully copied file
  /usr/lib/python2.5/site-packages/TileCache-2.10-py2.5.egg/TileCache/tilecache.cfg
  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
    </Directory>

* Visit:
  
  http://example.com/yourdir/tilecache.cgi?LAYERS=basic&SERVICE=WMS
  &VERSION=1.1.1&REQUEST=GetMap&SRS=EPSG:4326&BBOX=-180,-90,0,90
  &WIDTH=256&HEIGHT=256
  
* Or visit:

  http://example.com/yourdir/tilecache.cgi/1.0.0/basic/0/0/0.png

* 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:

  ::

     #!/usr/local/bin/python

Under Apache, you might see an error message like:

  ::

    [Wed Mar 14 19:55:30 2007] [error] [client 127.0.0.1] (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