Created
October 19, 2015 21:17
-
-
Save veltman/3e9820d27bd14b3c6a7d to your computer and use it in GitHub Desktop.
Tilestache Recipe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.