Skip to content

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MapathonQA – JOSM Plugin

Post-mapathon data quality checker. The goal of this plugin is to give a quick, rough overview of the data quality output after a mapathon and create a report that can be shared with mapathon organisers/trainers so they are aware which issues they should highlight next time during training. Here is an example how the report looks like.

"Run QA & Generate Report" detects only objects created/modified during the mapathon's time window, as defined in "Find Mapathon Tasks...". If no time window defined (skipped Step 1) then it detects all objects. The Individual Checks submenu detects all objects as well.

Workflow

  1. MapathonQA → Find Mapathon Tasks...
    • Step 1 – Project & Time Window: enter the mapathon name (optional), the HOT Tasking Manager project ID and the mapathon's UTC time window (defaults to the last 2 hours). Optionally tick "Include this report in MapathonQA_history.csv" to log the results in an Excel file for future tracking and comparing with later mapathons.
    • Click Find Mapathon Tasks →. The plugin queries the HOT TM API for all tasks touched in that time window and builds a JOSM search query matching them.
    • Step 2 – Load & Select Tasks: Click "Copy Search Query to Clipboard".
  2. Load the task grid into JOSM — happens automatically on Close & Continue if you leave the checkbox ticked.
  3. Edit → Search (Ctrl+F), paste the copied search query to select the tasks touched during the mapathon's time window
  4. Download OSM data for the selected tasks using File → Download Along...
  5. MapathonQA → Run QA & Generate Report — runs the 7 checks against the downloaded data, restricted to the mapathon's time window. Flagged objects are selected in the editor, an HTML report is generated, and (if enabled in Step 1) a row is appended to the history CSV file.
  6. Review the flagged selection in JOSM, and share the HTML report with organisers/trainers.

Other entry points from the menu:

  • Set Report Save Folder... — choose where reports and the history CSV are saved; if unset, falls back to your Downloads folder, then Desktop, then the home folder.
  • Individual Checks submenu — run any of the 7 report checks standalone against the whole current layer with no time filter

Want to see what a report looks like before running the plugin? See the sample at https://missingmaps.org/DEMOreport/.

Credits

The non-orthogonal building check (CheckNonOrthogonalBuildingsAction.java) ports the classification logic from Mapathoner's Helper.that_building() — same thresholds, same branch structure — reimplemented here using JOSM's own Way.getAngles(). Mapathoner is by qeef: https://mapathoner.mapathon.cz/

This plugin was built with the help of Claude, Anthropic's AI chatbot, used throughout for design, implementation, and debugging.

Menu structure

MapathonQA
├── Find Mapathon Tasks...
├── Run QA & Generate Report
├── ───────────────
├── Set Report Save Folder...
├── ───────────────
└── Individual Checks ▸
    ├── Select Non-yes Building Tags
    ├── Select Overlapping Buildings
    ├── Select Buildings on Highways
    ├── Select Non-orthogonal Buildings
    ├── Select Buildings with Layer Tag
    ├── Select Buildings with Shared Nodes
    └── Select Untagged Objects

All items in the submenu run with no time filter, independent of the full QA Check/report.

Architecture

File Purpose
MapathonQAPlugin.java Entry point, builds menu (see Menu structure below)
RunFullQAAction.java Wizard: HOT TM API → task IDs → JOSM search query
RunQAOnCurrentLayerAction.java Runs all 7 checks with progress dialog, generates report
SetReportFolderAction.java Lets the user override where HTML reports are saved (JOSM preference mapathonqa.reportDir)
HistoryLogger.java Appends one row per real QA run to a persistent MapathonQA_history.csv for tracking quality trends over time — opt-in, off by default
CheckNonYesBuildingTagsAction.java Check 1: building ≠ yes (menu: "Select Non-yes Building Tags")
CheckOverlappingBuildingsAction.java Check 2: overlapping/contained buildings (matches JOSM's own built-in validator classification — see below), including exact-duplicate ways (GeometryUtil.isExactDuplicate) (menu: "Select Overlapping Buildings")
CheckBuildingsOnHighwaysAction.java Check 3: buildings crossing roads, excluding building=roof (menu: "Select Buildings on Highways")
CheckNonOrthogonalBuildingsAction.java Check 4: non-square corners (ported from Mapathoner's Helper.that_building(), see Credits) (menu: "Select Non-orthogonal Buildings")
CheckBuildingLayerTagAction.java Check 5: buildings with layer=* tag (menu: "Select Buildings with Layer Tag")
CheckBuildingsWithSharedNodesAction.java Check 6: shared nodes between buildings and other objects (menu: "Select Buildings with Shared Nodes")
CheckUntaggedWaysAction.java Check 7: untagged objects — ways, plus standalone untagged nodes not used as a way vertex (multipolygon members excluded) (menu: "Select Untagged Objects")
GeometryUtil.java Ray-casting, segment intersection, exact-duplicate detection, time filter, building-overlap classification via JOSM's own Geometry.polygonIntersection
QAResults.java Data container for all check results
ReportWriter.java Generates branded HTML report (MM logo embedded as base64 SVG)

HOT TM API

GET https://tasking-manager-production-api.hotosm.org/api/v2/projects/{ID}/activities/latest/

Returns latest action per task. Plugin filters by actionDate within the time window. All taskStatus values included (MAPPED, VALIDATED, INVALIDATED, BADIMAGERY, READY).

About

JOSM plugin to generate feedback report for mapathon organisers

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages