Map generator based on this article.
See Makefile
It is is not necessary to install Mapnik, PostgreSQL and other staff to work with generator.
You can run make generate_map
and see result in matplotlib chart.
Requires Python 3.
Create virtualenv with --system-site-packages(it is problem to install mapnik into virtualenv).
$ virtualenv-3.4 env --system-site-packages
Follow this https://github.com/mapnik/mapnik/wiki/UbuntuInstallation. Tested with mapnik 2.3
Install TileStache to Python 2.7:
$ pip install TileStache
And run from Python 2.7, because it does not support Python 3.
$ sudo apt-get install postgresql-9.4 postgresql-contrib-9.4 libpq-dev
If packages are not available follow this instruction
how to add repository. (Check Ubuntu version lsb_release -a
)
https://docs.djangoproject.com/en/1.8/ref/contrib/gis/install/
$ pip install -v -r requirements.txt
$ sudo su - postgres
$ createdb fantasy_map
$ createuser -P fantasy_map
Enter password for new role: fantasy_map
Enter it again: fantasy_map
$ psql
postgres=# GRANT ALL PRIVILEGES ON DATABASE fantasy_map TO fantasy_map;
$ ./manage.py migrate
$ ./manage.py import_map