Quality Assurance Tools script
This script can be used in JOSM to download errors from different error detectors, show them as markers layers and check them one after another.
Latest release: qat_script.zip v0.6
(older release: v0.5.3)
- Errors download of currently observed area in JOSM, from different error detectors. The type of error can be selected from a menu or a toggle dialog, in the second case, multiple kinds of error can be downloaded at once.
- Progressive correction of downloaded errors by clicking "next", "next", "next"...
- Automatic flag to server (KeepRight, Osmose, Errori in OSM Italia Grp, housenumbervalidator) of false positive errors or information gathering for manual report (OSM Inspector) to the tool admin.
- Flag errors to be ignored. They will be stored on a local black-list file and not shown to the mapper again.
- Clickable markers for zooming/downloading a specific error. The level of the clicked marker must be activated.
- Multiple favourite zones can be set so that only errors within it will be downloaded. It can be a rectangle, a polygon drawn by hand or an administrative boundary with specific tags (more info).
- A list of favourites checks can be created by selecting different checks belonging to different tools and find them again quickly.
- A local GPX file can be opened. Its waypoints will be used as positions that the user can visit in sequence to check for errors (more info).
Supported QA Tools
|Tool||Max number of errors downloaded||Flag false positives||Flag corrected error|
| OSM Inspector 
(not all checks)
|Errori OSM Italia Grp ||None||Yes||No|
|Error detecting tools may be wrong and show errors that are not really there. If you have any doubt, don't modify the data and click the "Ignore button". If you want, send a message to the mapper that created that data and talk with him/her.|
1. Zoom to the zone of your interest, in JOSM
2. download the errors from the "QA Tools" menu or the download dialog
Correct the downloaded errors one by one.
When a favourite zone is active, only errors within this area will be downloaded.
You can create a new favourite zone in one of these ways:
- from the Preferences (see video from min 1:50)
- by adding one or more text file into "qat_script/configuration/favourite_zones" directory.
A file can contain a bbox, for a rectangular zone or a WKT geometry. In the second case, just copy a geometry from QGIS, paste it on a text file and, optionally, add a country code after the geometry description (e.g. file Rome.txt, content "MULTYPOLYGON(...)|IT").
Pre-built zones: regions and counties of Italy.
- Holes in zones are not considered. If a favourite zone is created from a boundary only outer ways are used.
- Warning. When a tool has a maximum number of errors that can be downloaded (10000 from KeepRight, 500 from Osmose), it may happen that not all the errors of the zone are shown, depending on the zone shape and errors position. If you want to be sure that you corrected all the errors of the zone, download them again after having corrected some or choose a rectangular favourite zone.
Example (see image): suppose there are 80 errors in the favourite zone. The script downloads a maximum of 100 errors (green) from the rectangle (bbox) and shows to the user 60 errors falling inside the area (40 fall outside, top right). After 20 of 60 errors area corrected it will be possible to download the remaining 20 errors (red).
From QA Tools menu it is possible to open a local GPX file whose waypoints are used as errors positions.
Anyone who finds errors while analyzing OSM data may create a GPX with these errors as waypoints and ask a local community to check them one by one with QATs. The script can read the content of desc and osmid tags from the GPX file to:
- show a description of the error in in QATs dialog
- automatically download and select the affected OSM object.
<wpt lat="12.34567" lon="12.34567"> <desc>This is a self intersecting way</desc> <extensions> <ogr:osmid>w12345567</ogr:osmid> </extensions> </wpt>
Hints on how to create a suitable GPX from a PostGIS database created with osmosis.
SELECT 'w'||id AS osmid, 'This is a self intersecting way' AS desc, ST_StartPoint(linestring) AS geometry FROM ways WHERE sql to find errors;
Export to GPX:
ogr2ogr -f "GPX" filename "PG:host=localhost user=username port=5432 dbname=dbname password=pwd" -sql "sql" -nlt "POINT" -dsco GPX_USE_EXTENSIONS=YES
Code: on GitHub
Author: Simone F.
Note. I wrote this script because I could not find a JOSM plugin which could fetch errors from multiple QA tools. I just know a bit of Python and I would be happy if this code could be used or could inspire someone to create a regular Java plugin with these features, or to extend an existing plugin.
If you want to translate the script's gui to your language, please translate this page.