Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 150 lines (94 sloc) 4.292 kb
ca9eaa0 Bumped version number and added some rules for live deployment
migurski authored
1 TileStache: a stylish alternative for caching your map tiles.
0a0e06a Started README
Michal Migurski authored
2
3 TileStache is a Python-based server application that can serve up map tiles
4 based on rendered geographic data. You might be familiar with TileCache
5 (http://tilecache.org), the venerable open source WMS server from MetaCarta.
6 TileStache is similar, but we hope simpler and better-suited to the needs of
7 designers and cartographers.
8
f7872b8 Added more core documentation per Aaron's suggestions
Michal Migurski authored
9 ---- Synopsis ----
10
11 import TileStache
12 import ModestMaps
13
14 config = {
15 "cache": {"name": "Test"},
16 "layers": {
4150ef1 @springmeyer Add install instructions to the README + add Quickstart section and f…
springmeyer authored
17 "example": {
18 "provider": {"name": "mapnik", "mapfile": "examples/style.xml"},
f7872b8 Added more core documentation per Aaron's suggestions
Michal Migurski authored
19 "projection": "spherical mercator"
20 }
21 }
22 }
23
4150ef1 @springmeyer Add install instructions to the README + add Quickstart section and f…
springmeyer authored
24 # like http://tile.openstreetmap.org/1/0/0.png
25 coord = ModestMaps.Core.Coordinate(0, 0, 1)
f7872b8 Added more core documentation per Aaron's suggestions
Michal Migurski authored
26 config = TileStache.Config.buildConfiguration(config)
1eb6383 @springmeyer fix a few broken aspects of the example commands and script in the re…
springmeyer authored
27 type, bytes = TileStache.getTile(config.layers['example'], coord, 'png')
f7872b8 Added more core documentation per Aaron's suggestions
Michal Migurski authored
28
29 open('tile.png', 'w').write(bytes)
0a0e06a Started README
Michal Migurski authored
30
4150ef1 @springmeyer Add install instructions to the README + add Quickstart section and f…
springmeyer authored
31
32
33 ---- Dependencies ----
34
1eb6383 @springmeyer fix a few broken aspects of the example commands and script in the re…
springmeyer authored
35 Required:
36
4150ef1 @springmeyer Add install instructions to the README + add Quickstart section and f…
springmeyer authored
37 - ModestMaps: http://modestmaps.com, http://github.com/migurski/modestmaps-py
1eb6383 @springmeyer fix a few broken aspects of the example commands and script in the re…
springmeyer authored
38 - Python Imaging Library (PIL): http://www.pythonware.com/products/pil
39
40 Optional:
41
4150ef1 @springmeyer Add install instructions to the README + add Quickstart section and f…
springmeyer authored
42 - Simplejson: https://github.com/simplejson/simplejson (optional if using >= python 2.6)
43 - mapnik: http://mapnik.org (optional)
44 - werkzeug: http://werkzeug.pocoo.org/ (optional)
45
1eb6383 @springmeyer fix a few broken aspects of the example commands and script in the re…
springmeyer authored
46 Install the pure python modules with pip:
4150ef1 @springmeyer Add install instructions to the README + add Quickstart section and f…
springmeyer authored
47
1eb6383 @springmeyer fix a few broken aspects of the example commands and script in the re…
springmeyer authored
48 sudo pip install -U PIL modestmaps simplejson werkzeug
4150ef1 @springmeyer Add install instructions to the README + add Quickstart section and f…
springmeyer authored
49
50 Install pip (http://www.pip-installer.org/) like:
51
9a33e86 @drnextgis Edited README via GitHub
drnextgis authored
52 curl -O https://raw.github.com/pypa/pip/master/contrib/get-pip.py
4150ef1 @springmeyer Add install instructions to the README + add Quickstart section and f…
springmeyer authored
53 sudo python get-pip.py
54
1eb6383 @springmeyer fix a few broken aspects of the example commands and script in the re…
springmeyer authored
55 Install Mapnik via instructions at:
56
57 http://mapnik.org/download
58
4150ef1 @springmeyer Add install instructions to the README + add Quickstart section and f…
springmeyer authored
59
60 ---- Installation ----
61
62 TileStache can be run from the download directory as is. For example the scripts:
63
64 tilestache-render.py tilestache-seed.py tilestache-server.py
65
66 Can all be run locally like:
67
1eb6383 @springmeyer fix a few broken aspects of the example commands and script in the re…
springmeyer authored
68 ./scripts/tilestache-server.py
4150ef1 @springmeyer Add install instructions to the README + add Quickstart section and f…
springmeyer authored
69
70 To install globally do:
71
72 python setup.py install
73
74 * Note: you may need to prefix that command with 'sudo' to have permissions
75 to fully install TileStache.
76
77
78 ---- Quickstart ----
79
80 To make sure TileStache is working start the development server:
81
1eb6383 @springmeyer fix a few broken aspects of the example commands and script in the re…
springmeyer authored
82 ./scripts/tilestache-server.py
4150ef1 @springmeyer Add install instructions to the README + add Quickstart section and f…
springmeyer authored
83
84 Then open a modern web browser and you should be able to preview tiles at:
85
86 http://localhost:8080/osm/preview.html
87
1eb6383 @springmeyer fix a few broken aspects of the example commands and script in the re…
springmeyer authored
88 This is a previewer that uses ModestMaps and OpenStreetMap tiles from
89 http://tile.osm.org as defined in the default config file 'tilestache.cfg'
4150ef1 @springmeyer Add install instructions to the README + add Quickstart section and f…
springmeyer authored
90
91
ade81c9 More style tweaking of API docs and some needed links
migurski authored
92 ---- Documentation ----
93
4150ef1 @springmeyer Add install instructions to the README + add Quickstart section and f…
springmeyer authored
94 The next step is to learn how build custom layers and serve them.
95
96 See http://tilestache.org/doc/ for details.
97
ade81c9 More style tweaking of API docs and some needed links
migurski authored
98
f7872b8 Added more core documentation per Aaron's suggestions
Michal Migurski authored
99 ---- Features ----
100
101 Rendering providers:
102 - Mapnik
e8b2e51 Added new proxy provider for fronting other tile providers
Michal Migurski authored
103 - Proxy
ef4e76e Updated list of current features
Michal Migurski authored
104 - Vector
105 - Templated URLs
f7872b8 Added more core documentation per Aaron's suggestions
Michal Migurski authored
106
107 Caching backends:
108 - Local disk
109 - Test
ef4e76e Updated list of current features
Michal Migurski authored
110 - Memcache
111 - S3
0a0e06a Started README
Michal Migurski authored
112
4150ef1 @springmeyer Add install instructions to the README + add Quickstart section and f…
springmeyer authored
113
0a0e06a Started README
Michal Migurski authored
114 ---- Design Goals ----
115
85b0799 Going on in the readme
Michal Migurski authored
116 The design of TileStache focuses on approachability at the expense of
117 cleverness or completeness. Our hope is to make it easy for anyone to design
118 a new map of their city, publish a fresh view of their world, or even build
119 the next 8-Bit NYC (http://8bitnyc.com).
120
121 * Small
122
123 The core of TileStache is intended to have a small code footprint.
124 It should be quick and easy to to understand what the library is doing and
125 why, based on common entry points like included CGI scripts. Where possible,
126 dynamic programming "magic" is to be avoided, in favor of basic, procedural
127 and copiously-documented Python.
128
129 * Pluggable
130
131 We want to accept plug-ins and extensions from outside TileStache, and offer
132 TileStache itself as an extension for other systems. It must be possible to
133 write and use additional caches or renderers without having to modify the
134 core package itself, extend classes from inside the package, or navigate
135 chains of class dependencies. Duck typing and stable interfaces win.
136
137 * Sensible Defaults
138
139 The default action of a configured TileStache instance should permit the most
140 common form of interaction: a worldwide, spherical-mercator upper-left oriented
141 tile layout compatible with those used by OpenStreetMap, Google, Bing Maps,
142 Yahoo! and others. It should be possible to make TileStache do whatever is
143 necessary to support any external system, but we eschew complex, impenetrable
144 standards in favor of pragmatic, fast utility with basic web clients.
0a0e06a Started README
Michal Migurski authored
145
f7872b8 Added more core documentation per Aaron's suggestions
Michal Migurski authored
146
147 ---- License ----
148
30aeaa3 Committed to BSD license
migurski authored
149 BSD, see LICENSE file.
Something went wrong with that request. Please try again.