Install and Setup TileStache
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
…and Test it:
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