HOT Tasking Manager

The tasking manager was created by HOT, the Humanitarian OpenStreetMap Team for coordinating mapping of disasters. This is primarily done either through activating volunteers to trace satellite imagery, or an organized mapathon.

I've found the tasking manager (TM) useful for my own importing projects, but the process is different. TM breaks down a large area into blocks so you are working only on a small section. It allows a user to lock an area while they are editing, so others don't duplicate the effort. Even if I'm working solo, it's a useful way for me to keep track of where I've been working. It sends the data for that area to the editor of your choice, I use JOSM, so that's what is documented here.

To get started, I download the relevant source datasets off my website if I have it. I currently have much data, roads and trails in public lands, footprints from Bing, and sometimes house addresses. All have a public domain license, so suitable for importing into OSM. I load the source files that have data I want to import into JOSM. When I click on the Edit button in TM, it'll load the OSM data for that area into JOSM. Also right under the editor button is a link to download the GPX boundary of the area being worked on. I find this useful as when I'm viewing data in the other source files, it's an easy reference to make sure I'm not conflating data outside the area.

Install Tasking Manager on CentOS 8

Since all the documentation on installing Tasking Manager from git is oriented to Debian/Ubuntu, I thought I'd write down how I got it working on CentOS 8 Stream.

Install Python

The backed of Tasking Manager 4 is written in python, so needs a stable python environment to run in. The usual way to do this is to create a virtual python environment that stays stable.

	python3 -m pip install virtualenv
	python3 -m virtualenv venv
	. venv/bin/activate
	venv/bin/python -m pip install -r requirements.txt
      

To run a python program under Apache, I used WSGI as it's more efficient. I never found any examples of how to do this, so here's what worked for me. I load the virtual python environment we just created, and then start the backend running.

# tm4.wsgi
# load virtual python environment
activate_this = '/path/tm.git/venv/bin/activate_this.py'
with open(activate_this) as file_:
	exec(open(activate_this).read(), {'__file__': activate_this})

# start it
from backend import create_app, db
application = create_app()

if __name__ == "__main__":
    application.run(host='0.0.0.0')
    

Apache Config

Then I configured Apache to execute the WSGI script whenever the root of the virtual host is accessed.

#
# Tasking Manager support
#
WSGIDaemonProcess tm4_process user=apache group=apache processes=1 \
        lang=en_US.UTF-8 \
        threads=4 \
        python-home=/ \
        python-path=/path/tm.git/venv8/bin:/path/tm.git/venv8/lib/python3.8/site-packages/:/path/tm.git/
WSGIRestrictStdin Off


        DocumentRoot /path/tm.git
        ServerName tm4.foo.com
        WSGIScriptAlias / /path/tm.git/tm4.wsgi
        ServerAlias tm4
        ErrorLog /var/log/httpd/tm4.error_log
        TransferLog /var/log/httpd/tm4.access_log



        DocumentRoot /path/tm.git
        WSGIScriptAlias / /path/tm.git/tm4.wsgi
        ServerName tm3.foo.com
        ServerAlias tm4
        ErrorLog /var/log/httpd/tm4.error_log
        TransferLog /var/log/httpd/tm4.access_log
        SSLEngine on
        SSLCertificateFile /etc/letsencrypt/XXX/cert.pem
        SSLCertificateKeyFile /etc/letsencrypt/XXX/privkey.pem
        SSLCertificateChainFile /etc/letsencrypt/XXX/chain.pem
        Options +ExecCGI
        SetHandler wsgi-script



    AllowOverride None
    Require all granted



    WSGIProcessGroup tm4_process
    WSGIApplicationGroup %{GLOBAL}
    Options +ExecCGI
    AddHandler wsgi-script .wsgi


I wrote up a tutorial on how I import data that covers this process in more detail. Once an area is mapped, it needs to be validated by an experienced mapper. At least for the projects on this site, I'm the validator and fix my own mistakes.

Top of project, Top of source data

Copyright © 2019,2020 Seneca Software & Solar, Inc