joseph.leach 64d53f0edd | 5 years ago | |
---|---|---|
css | 5 years ago | |
img | 5 years ago | |
www | 5 years ago | |
.gitignore | 5 years ago | |
LICENSE | 5 years ago | |
Pipfile | 5 years ago | |
Pipfile.lock | 5 years ago | |
README.md | 5 years ago | |
audit.db | 5 years ago | |
cf_audit.wsgi | 5 years ago | |
config.py | 5 years ago | |
requirements.txt | 5 years ago | |
run.py | 5 years ago | |
start.sh | 5 years ago | |
update_features.py | 5 years ago |
This website takes a JSON output from OSM Conflator and presents logged-in users an interface for validating each imported point, one-by-one
It records any changes and produces a file that can be later fed back to osm_conflate
This is a fork of a project written by Ilya Zverev for MAPS.ME. Published under Apache License 2.0
you can use pipenv
pipenv install
pipenv shell
./run.py
note - pipenv may not be able to resolve dependencies (this is possibly an issue with a now deprecated version of the oauth lib) - it is worth trying the suggestions pipenv gives (i tend to use pipenv install --skip-lock
):
[pipenv.exceptions.ResolutionFailure]: Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
First try clearing your dependency cache with $ pipenv lock --clear, then try the original command again.
Alternatively, you can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
Hint: try $ pipenv lock --pre if it is a pre-release dependency.
...all going well, you will see:
Installing dependencies from Pipfile…
🐍 ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 3/3 — 00:00:12
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
so to start the audit web app, you could do:
pipenv run ./run.py
if you don't have pipenv, but do have pip, you can use pip and requirements.txt
pip install -r requirements.txt
you'll have to register your client app on OpenStreetMap oauth
make sure to select the read their user preferences
option
as with osm, you can also register the app and callback url to help with surveying sites in street view perspective
ultimately the callback url should be a public url but during early stages localhost can be used
once registered, you can add the mapillary client_id to config.py
using sqlite you can obtain the id number of your logged in user and add this to config.py
sqlite3 audit.db
.tables
feature project task user version
.schema user
CREATE TABLE IF NOT EXISTS "user" ("uid" INTEGER NOT NULL PRIMARY KEY, "admin" INTEGER NOT NULL, "bboxes" TEXT);
select * from user;
9465963|0|51.01375465718821,-1.8999481201171877,52.55715099278441,1.3183593750000002
the initial conflation .json
and .osm
audit files that feed into this are created run in a project containing the profile.py
required to output the necessary files
some help was given by osm community members, and the board of the osm cic recommended using the osm conflation tool and audit frontend
having created conflation .json
and .osm
files, and made yourself an admin in your client app db (see section on sqlite above), log in and you'll see the option to create/update a project
make sure the project short name has no spaces in it as it is used to form the url
make sure to select the Enable validation
option
the client app should be published online and made available to the osm community for the purposes of validating the data
by including a start.sh
it is possible to clone this repo to glitch, providing a secure public url:
# For development use (simple logging, etc):
python run.py
# For production use:
# gunicorn run:app -w 1 --log-file -
once you've got a URL, now you're ready to involve the osm community with your data checks, implementing the longer, but more valid, route around Ilya Zverev's procedure shown below:
You should not upload any imports to OpenStreetMap without discussing them first. In case of conflated points, you have a GeoJSON file to show, so your fellow mappers can find mistakes in tagging and estimate the geometric precision of new points. You can do even better: ask an opinion for each of the imported points.