Skip to content

Install and Setup TileStache

26. October 2012

Today I made some first tests with TileStache and I have to document the installation, to be able to do it again šŸ˜‰ Especially, because I had some problems with the Python Imagine Library (PIL)!

Currently I am working with Ubuntu 12.04 64bit

First install dependencies:

sudo pip install -U modestmaps simplejson werkzeug

–> in the original instructions was also stated to install PIL but I had some problems with that…it was not able to load the zip-encoder, raising this error: raise IOError(“encoder %s not available” % encoder_name)
IOError: encoder zip not available

Thus, I followed these instructions and did the following:

sudo pip uninstall PIL

(optional, when already installed)

sudo apt-get install libjpeg8 libjpeg62-dev libfreetype6 libfreetype6-dev
sudo ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib
sudo ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so /usr/lib
sudo ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib
sudo pip install -U PIL

For my system are now all dependencies correctly installed as Mapnik is already set up!

Now, download the source code:

cd ~/Software
git clone https://github.com/migurski/TileStache
cd TileStache

Finally, install TileStache globally:

sudo python setup.py install

Run…

./scripts/tilestache-server.py

…and Test it:

http://localhost:8080/osm/preview.html

Very helpfull is also the zoom Example in the directory ‘examples’ as it shows how to define configuration files etc.!

cd examples/zoom_example
tilestache-server.py -c zoom_example.cfg -i 127.0.0.1 -p 7890
file:///home/of/TileStache/examples/zoom_example/test.html
Advertisements

From → tutorial

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: