Error detection in OpenStreetMap
This repository shows an easy way to detect errors in OSM using osmlint and osm-qa-tiles
Clone the repository
git clone https://github.com/Rub21/run-osmlint.git
Install dependencies
run-osmlint$ sudo ./install.shObtaining data
osmlint works with the data produced by osm-qa-tiles. You can get MBtiles data from the planet or the MBtiles data by contry
For this example I will use peru.mbtiles
Getting the bounding box for Peru
You can use the wiki for the Bbox or this page as well, use the mouse to select places you want to work on and copy the coordinates that appear within the URL. e.g
-81.462250,-18.417079,-68.542328,0.24169850
Executing the comands
To run all validators you can use the following command.
./worker.sh https://s3.amazonaws.com/mapbox/osm-qa-tiles/latest.country/peru.mbtiles.gz "[-81.462250,-18.417079,-68.542328,0.24169850]"
In case you want to run the validator separately, you can use the following commands.
wget -O /tmp/peru.mbtiles.gz https://s3.amazonaws.com/mapbox/osm-qa-tiles/latest.country/peru.mbtiles.gz
gunzip /tmp/peru.mbtiles.gz
osmlint crossinghighways --bbox="[-81.462250,-18.417079,-68.542328,0.24169850]" /tmp/peru.mbtiles > /tmp/crossinghighways.json
python utils/merge-geojson.py /tmp/crossinghighways.json > /tmp/crossinghighways.final.json
geojson-josm-url /tmp/crossinghighways.final.json | gist -f crossinghighways.final.jsonthe output will be a URL gist like: https://gist.github.com/7bd40a110f8118e753e3
Result
- Bridge onnode
http://rub21.github.io/geojson-dashboard/#https://gist.github.com/17bfc6999ea1d2452f05
- Crossing highways...
http://rub21.github.io/geojson-dashboard/#https://gist.github.com/0061533a1b1369f2523a
- Crossing waterways and highways...
http://rub21.github.io/geojson-dashboard/#https://gist.github.com/ed6fdd7b37cf283731ff
- Missing layer on bridges...
http://rub21.github.io/geojson-dashboard/#https://gist.github.com/05a6ec4d263569d40d66
- Node ending near highway...
http://rub21.github.io/geojson-dashboard/#https://gist.github.com/e593889b973c221aafe8
- Self intersecting highways...
http://rub21.github.io/geojson-dashboard/#https://gist.github.com/ed2e30864fb1447d1de0
- Unclosedways...
http://rub21.github.io/geojson-dashboard/#https://gist.github.com/3c282c6eba5d067baff2
- Unconnected highways...
http://rub21.github.io/geojson-dashboard/#https://gist.github.com/40b38e802556f94f41d9
To see these errors on a dashboard, you can use this fork form geojson-dashboard.