Makefiles to process GIS data to json/topojson for Wikimaps Atlas.
- Create postgres database with postgis extensions
- Load GIS data shapefiles into database
- Run spatial queries on database to generate new shapefiles
- Optimize shapefiles as topojson
- Postgres 9.3 with PostGIS 1.5
- Python 2.7
- Clone this repository
- Initialize and update the submodules
git submodule init
git submodule update
Create symlinks for the data and output directories
cd wikimapsatlas-server
ln -s ../data/download make-modules/data
ln -s ../data/make-modules/output
npm install topojson
virtualenv . source bin/activate' pip install -r ../requirements.txt
See https://wikitech.wikimedia.org/wiki/User:Pathoschild/Getting_started_with_Flask
vi ~/.lighttpd.conf
fastcgi.server += ( "/wikiatlas2014/api" =>
((
"socket" => "/tmp/wikiatlas2014-fcgi.sock",
"bin-path" => "/data/project/wikiatlas2014/wikimapsatlas-server/api/app.fcgi",
"check-local" => "disable",
"max-procs" => 1,
))
)
url.redirect = ( "^/wikiatlas2014/api$" => "/wikiatlas2014/api/" )
debug.log-request-handling = "enable"
''' vi api/setting.py '''
''' host = "localhost" port = "5432" user = "postgres" password = "postgres" database = "wikimaps_atlas" geometry = "geom" '''
cd wikimapsatlas-server symlink data
Add the wikimapsatlas-server/node_modules folder to ~/.profile
export PATH="$HOME/.rbenv/bin:/data/project/wikiatlas2014/wikimapsatlas-server/node_modules/topojson/bin:$PATH"
cd wikimapsatlas-server git pull
vi ~/error-atlas.log
'''