{"id":20652335,"url":"https://github.com/openpolis/tilestache","last_synced_at":"2026-04-18T22:32:00.740Z","repository":{"id":10946720,"uuid":"13255500","full_name":"openpolis/tilestache","owner":"openpolis","description":"A minimal tilestache server implementation used at openpolis.","archived":false,"fork":false,"pushed_at":"2014-05-05T06:50:05.000Z","size":636,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-09T21:20:02.983Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openpolis.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-10-01T20:55:51.000Z","updated_at":"2019-05-22T14:11:27.000Z","dependencies_parsed_at":"2022-08-30T10:51:10.768Z","dependency_job_id":null,"html_url":"https://github.com/openpolis/tilestache","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/openpolis/tilestache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpolis%2Ftilestache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpolis%2Ftilestache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpolis%2Ftilestache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpolis%2Ftilestache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openpolis","download_url":"https://codeload.github.com/openpolis/tilestache/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpolis%2Ftilestache/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31987754,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"ssl_error","status_checked_at":"2026-04-18T20:23:29.375Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T17:33:56.115Z","updated_at":"2026-04-18T22:32:00.720Z","avatar_url":"https://github.com/openpolis.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"This project contains configuration files and instructions needed to install and deploy Tilestache_ server\n\nA tilestache server can be used to serve raster or vectorial tiles for google maps style applications.\n\nRequirements and installation\n=============================\n\nThe Tilestache python package need to be installed within a virtualenv_. It requires some image-processing,\nso some libraries need to be installed as OS packages, to handle jpeg, png and other image types.\n\nAs for a Ubuntu 12.04 linux distribution::\n\n    apt-get install build_essentials python_devel libpng12_dev libjpeg62_dev zlib1g_dev\n    ln -s /usr/lib`uname -i`-linux-gnu/libpng.so /usr/lib\n    ln -s /usr/lib`uname -i`-linux-gnu/libjpeg.so /usr/lib\n    ln -s /usr/lib`uname -i`-linux-gnu/libfreetype.so /usr/lib\n    ln -s /usr/lib`uname -i`-linux-gnu/libz.so /usr/lib\n    apt-get install python-pip\n    pip install virtualenv virtualenvwrapper\n\n\nThe libraries need to be linked in the `/usr/lib` path in order to correctly compile PIL_, which is a required package.\n\nSetup the virtualenvwrapper environment variables within ``.bashrc``::\n\n    cat bashrc \u003e\u003e ~/.bashrc\n\nGenerate the virtualenv::\n\n    mkvirtualenv tilestache\n    git clone git@github.com:openpolis/tilestache.git\n    cd tilestache\n    setvirtualenvproject\n\nInstall the Tilestache_ python package::\n\n    workon tilestache\n    pip install Tilestache\n\n.. _PIL: http://www.pythonware.com/products/pil/\n.. _virtualenv: https://pypi.python.org/pypi/virtualenv\n\n\n\nTest\n====\n\nThe Tileserver is a WSGI application.\nProvided a `tiles.cfg` configuration file, it can be run, for debugging purposes, through werkzeug_, by::\n\n    python test.py\n\nThe server will answer on port 8083, and you can test it through::\n\n    curl http://localhost:8083/ =\u003e \"TileStache bellows hello.\"\n    curl http://localhost:8083/cm/2/2/2.png \u003e tile.png =\u003e a correct png image\n\n\nThe sample configuration presented in the repository only shows how to set up a proxy\nfor the a particular Cloudmade.com map style, for which you need an API_KEY.\nSee the Tilestache_ documentation to check many other possible possibilities.\n\nExtremely fast tiles serving can be obtained through caching_.\n\n.. _Tilestache: http://tilestache.org\n.. _werkzeug: http://werkzeug.pocoo.org/\n\n\nDeploy instructions\n===================\n\n::\n\n    apt-get install nginx-full uwsgi uwsgi-plugin-python supervisor\n    ln -s supervisor.conf /etc/supervisor/conf.d/uwsgi-emperor.conf\n    /etc/init.d/supervisor restart\n\n    ln -s nginx.conf /etc/nginx/sites-enabled/tilestache\n    /etc/init.d/nginx restart\n\n    ln -s uwsgi.ini /etc/uwsgi/vassals/tilestache.ini\n    supervisorctl stop uwsgi-emperor\n    supervisorctl start uwsgi-emperor\n\n\nThe service configured as above, will look for a configuration file in the ``CONFIG_FILE``\nenvironment variable, cascading to ``tiles.cfg`` by default.\n``CONFIG_FILE`` can contain a URL, so that dynamically generated config files are possible\n(as is the cas in the OpenCoesione project).\n\nThe uwsgi is launched through supervisor and logs the activity of the tilestache server.\nThe logging level can be specified in the logging section of tiles.cfg.\n\nAfter every modifications in the `tiles.cfg` configuration, restart with::\n\n    supervisorctl restart uwsgi-emperor\n\n\nMapnik note\n===========\n\nTileStache can be used to serve mapnik layers, but the mapnik2_ package needs to be installed.\n\nTo install mapnik in a virtualenv, under osx, the (unorthodox) procedure described at\nhttp://lab.openpolis.it/using-mapnik-inside-a-virtualenv-on-osx.html can be followed.\n\n.. _mapnik2: https://github.com/mapnik/mapnik/wiki/Mapnik2\n\n\nCaching strategies\n==================\n\nTilestache allows different caching_ mechanism to speedup the tile-serving process.\nAdd one of the following ``cache`` sections to the configuration file.\n\nDisk cache\n++++++++++\n\nThe path is relative to the ``chdir`` specified in ``uwsgi.ini``.\n\n::\n\n   \"cache\":\n     {\n       \"name\": \"Disk\",\n       \"path\": \"cache/\",\n       \"umask\": \"0000\"\n     },\n     ...\n\n\nRedis\n+++++\n\nRequires redis_ and the `python redis package`_.\n\n::\n\n   \"cache\": {\n      \"name\": \"Redis\",\n      \"host\": \"localhost\",\n      \"port\": 6379,\n      \"db\": 0,\n      \"key prefix\": \"tilestache\"\n    },\n    ...\n\n\n.. _redis:  http://redis.io\n.. _python redis package: https://pypi.python.org/pypi/redis\n\n\nS3 cache\n++++++++\n\nCaches tiles to `Amazon S3`_, requires boto_\n\n::\n\n   \"cache\": {\n      \"name\": \"S3\",\n      \"bucket\": \"\u003cbucket name\u003e\",\n      \"access\": \"\u003caccess key\u003e\",\n      \"secret\": \"\u003csecret key\u003e\",\n      \"reduced_redundancy\": \"False\"\n   },\n\n.. _Amazon S3: http://aws.amazon.com/s3/\n.. _boto:  https://github.com/boto/boto\n\n\nMulti\n^^^^^\n\nMulti-tiered caches can be used to mix speed and storage.\n\n::\n\n      \"cache\": {\n        \"name\": \"Multi\",\n        \"tiers\": [\n            {\n               \"name\": \"Redis\",\n               \"host\": \"localhost\",\n               \"port\": 6379,\n               \"db\": 3,\n               \"key prefix\": \"tilestache\"\n            },\n            {\n               \"name\": \"S3\",\n               \"bucket\": \"\u003cbucket name\u003e\",\n               \"access\": \"\u003caccess key\u003e\",\n               \"secret\": \"\u003csecret key\u003e\",\n               \"reduced_redundancy\": \"False\"\n            }\n        ]\n      },\n\n\n.. _caching:  See http://tilestache.org/doc/#caches\n\n\nExample\n^^^^^^^\n\nAn example configuration is contained in ``tiles_example.cfg``. It contains a proxy to a cloudmade layer,\nand a small mapnik layer, pointing to an XML file published with Tilemill.\n\nBefore running the example, copy ``tiles_sample.cfg`` into ``tiles_example.cfg``, \nand substitute your cloudmade's API_KEY and STYLE_ID.\n\nTo run the example on an OSX machine, you need to execute these scripts while in ``tilestache`` virtualenv::\n\n    CONFIG_FILE=tiles_example.cfg; uwsgi --ini uwsgi_dev_osx.ini\n    python -m SimpleHTTPServer\n\nThen you can see a map of northern Italy, colored in shades of green, with::\n\n    http://localhost:8000/example.html\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenpolis%2Ftilestache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenpolis%2Ftilestache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenpolis%2Ftilestache/lists"}