TileCache is an implementation of a WMS-C (about) compliant server made available under the BSD license by MetaCarta. (Also, TileCacheConfig)
TileCache provides a Python-based WMS-C/TMS server, with pluggable caching mechanisms and rendering backends. In the simplest use case, TileCache requires only write access to a disk, the ability to run Python CGI scripts, and a WMS you want to be cached. With these resources, you can create your own local disk-based cache of any WMS server, and use the result in any WMS-C supporting client, like OpenLayers, or any TMS supporting client, like OpenLayers and worldKit.
Download 2.11: .tar.gz, .zip | Changelog | Browse Source | Demo of TileCache in OpenLayers | Readme
To set up your own TileCache client/server:
- Download to a web directory that will run CGI.
- Untar the file: tar -zvxf tilecache-2.11.tar.gz
- Visit http://example.com/yourdir/tilecache-2.11/
- That's it! You're now caching WMS on your disk as you browse!
This TileCache client supports multiple different rendering backends. Each rendering backend also supports the ability to draw 'metatiles', where a large tile is rendered, and then chopped into smaller tiles using the Python Imaging library.
- MapServer -- render a tile using Python mapscript.
- Mapnik -- render a tile using the mapnik Python bindings.
- Cascading WMS -- fetch a tile from a remote WMS service. (Uses urllib to fetch tiles.)
In addition, there are two cache backends:
- DiskCache -- Store files on disk. (Files stored in directories like basic/0/000/001/053/000/021/052.png)
- MemoryCache -- Store data in a memcached instance or cluster. (Requires memcached server running.)
TileCache supports three tile request mechanisms: WMS requests, like this, WorldWind requests, like this one, and TMS requests, Like this one.
The TileCache library can speed up access to your WMS by factors of 10-100, or more. Under mod_python, cached requests can be handled at more than 300 requests per second.
TileCache Config
Although editing a config file isn't too hard, it typically requires somewhat lower level access than many users have to a system. TileCacheConfig is a web based configuration tool for TileCache that makes configuring TileCache via a web browser possible.
TileCache Config is currently an alpha release.
Download TileCacheConfig 0.1: .tar.gz, .zipAbout WMS-C
The WMS Tiling Client Recommendation, was the result of a set of discussions at the FOSS4G conference in 2006. The recommendation describes a way to constrain WMS requests to a predefined grid, so that clients can request data that has been pre-rendered or rendered on the fly and the cached. Delivering cached map imagery can reduce image load times from the client's point of view by as much as one or even two orders of magnitude.
Although some users of WMS have attempted to use naive HTTP proxies to solve the problems of WMS caching, caching HTTP proxies alone don't take full advantage of prior knowledge of the WMS protocol, and don't account for the various idiosyncrasies that WMS clients can present.
Rendering map imagery on the fly for every WMS request typically requires profound hardware resources to scale well, creating a barrier to entry for organizations wishing to offer WMS access to their data. We hope that creating simple-to-deploy solutions for caching map imagery will help to push forward the publication of geographic data via WMS servers, which will in turn make more and richer maps available to more people. At MetaCarta Labs, we intend to further this goal by developing software that implements WMS caching servers and clients, such as OpenLayers and TileCache.