springmeyer / TileLite

Lightweight Python tile-server using Mapnik rendering and designed to serve tiles in the OSM (OpenStreetMap) scheme.

Clone this repository (size: 431.6 KB): HTTPS / SSH
$ hg clone http://bitbucket.org/springmeyer/tilelite/

TileLite

A lightweight Mapnik tile-server written as a WSGI (Web Server Gateway Interface) application.

A 'gateway' tool to Mod_tile or TileCache.

Goals

  • Optimized for on-demand rendering of web tiles in the OSM scheme (zoom/x/y.png) and Google Mercator projection.
  • Supports on-the-fly caching of tiles or serving of cached tilesets.
  • Implements Mapnik PNG/JPEG formats and map buffers to avoid cut labels.
  • Maintains Map objects in memory for fast rendering in a multi-process environment (not threaded).
  • Built for scenarios where easy setup and speed to first rendering are top priorities.
  • Complements the more flexibile TileCache by providing a single-purpose tool for Mapnik.
  • Complements the powerful Mod_tile by providing a no-setup way of running locally or embedding within Apache (using mod-wsgi).
  • Able to work alongside the generate_tiles.py script by serving or regenerating a cache seeded by generate_tiles.py.

Requires

  • Python, Mapnik (>= 0.5.1), and a Mapnik xml or mml mapfile you wish to serve.
  • Reading mml (Mapnik Markup Language) requires Cascadenik.

Installing TileLite

To install the latest:

1
2
3
4
$ wget http://bitbucket.org/springmeyer/tilelite/get/tip.zip
$ unzip tip.zip
$ cd tilelite
$ sudo python setup.py install

Or, recommended, install from the repository:

1
2
3
4
$ sudo easy_install mercurial
$ hg clone http://bitbucket.org/springmeyer/tilelite
$ cd tilelite
$ sudo python setup.py install

Or install from pypi:

1
$ sudo easy_install tilelite

Features

  • Comes bundled with a development server that can be run from the commandline:
1
$ liteserv.py <xml> [options]
  • Can be deployed with Mod_wsgi using one thread and many processes.
  • Able to read from an optional configuration file for customization of various rendering and caching parameters.

More info

See the notes in the 'docs' folder and the sample 'tilelite.cfg' in the 'utils' folder.

References


This revision is from 2010-02-02 03:25