Skip to content

Instantly share code, notes, and snippets.

@veltman
Created October 19, 2015 21:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save veltman/3e9820d27bd14b3c6a7d to your computer and use it in GitHub Desktop.
Save veltman/3e9820d27bd14b3c6a7d to your computer and use it in GitHub Desktop.
Tilestache Recipe
# Update and upgrade
sudo apt-get update && sudo apt-get upgrade
# Install dependencies
sudo apt-get install git build-essential python-dev python-pip libxml2-dev libxslt1-dev libjpeg8 libjpeg62-dev libfreetype6 libfreetype6-dev gdal-bin python-gdal
# Install more dependencies
sudo pip install -U modestmaps werkzeug PIL --allow-external PIL --allow-unverified PIL
# Use home folder
cd ~/
# Get TileStache
git clone https://github.com/TileStache/TileStache.git
cd TileStache
# Install
sudo python setup.py install
# Add a GeoJSON file, like congress.geojson
# Edit TileStache/tilestache.cfg with something like:
{
"cache":
{
"name": "Test",
"path": "/tmp/stache",
"umask": "0000"
},
"layers":
{
"congress":
{
"provider": {"name": "vector", "driver": "GeoJSON","parameters": {"file": "../congress.geojson"},"properties": ["district"]}
}
}
}
# Run test server
sudo ./scripts/tilestache-server.py
# Test output with, e.g.:
# curl http://127.0.0.1:8080/congress/6/13/22.geojson
@veltman
Copy link
Author

veltman commented Oct 19, 2015

Had lots of issues with outdated/splintered TileStache docs - this is the recipe I used to successfully initialize TS from GeoJSON on a fresh server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment