Skip to main content

Platform for participatory mapping

Project description

PyPI Package Travis CI Build Status Coveralls Test Coverage Requirements Status


GeoKey is a platform for participatory mapping, that is developed by Extreme Citizen Science research group at University College London.

Install for development

GeoKey can be run on Python 2.7 only.

  1. Update your system:
sudo apt-get update && sudo apt-get upgrade
  1. Install PostgreSQL and PostGIS (we follow the official guides):
sudo sh -c 'echo "deb wheezy-pgdg main" >> /etc/apt/sources.list'
wget --quiet -O - | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-9.4-postgis-2.1 postgresql-contrib postgresql-server-dev-9.4
  1. Setup all other dependencies:
sudo apt-get install python-pip python-virtualenv python-dev libjpeg-dev binutils libproj-dev libav-tools gdal-bin python-gdal

For Ubuntu you might also need to install libavcodec-extra-52 or libavcodec-extra-53.

Setup database

  1. For simplicity, switch to user postgres:
sudo su - postgres
  1. Install PostGIS in template1 (required for running tests):
psql -d template1 -c 'create extension hstore;'
  1. Log in to the database:
  1. Create the user (replace django with your user):
postgres=# CREATE USER django WITH PASSWORD 'django123';
  1. Make created user a superuser on your database (this is required for tests only and shouldn’t be done in production):
postgres=# ALTER ROLE django WITH superuser;
  1. Create the database (replace django with your user and geokey with a desired name for the database):
postgres=# CREATE DATABASE geokey OWNER django;
  1. Log out and connect to the database:
postgres=# \q
psql -d geokey
  1. Install the required extensions:
geokey=# CREATE EXTENSION postgis;
geokey=# CREATE EXTENSION hstore;
  1. Log out of the database and a user:
geokey=# \q

Setup GeoKey

  1. Clone the repository:
git clone
  1. Install the package and development requirements:
cd geokey
pip install -e .
pip install -r requirements.txt
pip install -r requirements-dev.txt

You may need to add sudo before the pip commands, unless you are logged in as root or working within a virtual environment.

  1. Copy the directory local_settings.example to local_settings
cp -r local_settings.example local_settings
  1. Inside the local_settings open in a text editor and…

Add your database settings:

    'default': {
        'ENGINE': 'django.contrib.gis.db.backends.postgis',
        'NAME': 'geokey',
        'USER': 'django',
        'PASSWORD': 'xxxxxxxxx',
        'HOST': 'host',  # usually 'localhost'
        'PORT': ''

Set the secret key:

SECRET_KEY = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

Set the STATIC_ROOT directory:

STATIC_ROOT = '/some/path/'
  1. Migrate the database:
python migrate
  1. Add yourself as a superuser (you can use the same email and password to log into the system later):
python createsuperuser
  1. Run the collectstatic management command:
python collectstatic

Run the test server

python runserver

Run tests

python test

Running tests will remove all uploaded images of contributions from the assets directory. If you require to keep them, please use custom test settings with a –settings flag.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for geokey, version 1.2.4
Filename, size File type Python version Upload date Hashes
Filename, size geokey-1.2.4.tar.gz (1.2 MB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page