Clearance v0.5

Posted by frodrigo on 6 July 2026 in English.

Clearance: Quality filter for OpenStreetMap replication

Clearance is a free software tool for controlling the quality of OpenStreetMap replication diffs. It tracks thematic and territorial edits to OSM and keeps replication extracts (extracts, diffs, and a local Overpass API) up to date.

Instead of trusting every incoming change, Clearance evaluates edits against configurable quality rules based on OSM tags, metadata, geometry and changeset properties. Compliant changes, at object level, pass through automatically. Suspect ones are retained rather than applied. Retained data must either be fixed directly in OSM or approved manually. All data contributions are made only in OSM itself. Reviewing and fixing suspect changes is done collaboratively by the team responsible for a given theme and region.

Because it uses standard OpenStreetMap ecosystem formats for both input and output, Clearance integrates seamlessly into existing OSM data reusers workflows, while providing greater confidence in the consumed data. It is used to filter and review changes on thematic contributions such as tourism POIs across France, or road and emergency access points in Spain.

How Clearance addresses this problem

Clearance imports an initial OSM PBF extract, then checks every incoming change against configurable quality rules. Changes that meet the rules are applied automatically to the replicated database, while suspect changes are held back. Quarantined changes must then be fixed directly in OSM or manually approved by reviewers. After each update, previously held objects are re-evaluated, so a change is released automatically once it no longer fails the rules.

Instead of validating each object individually, Clearance uses the concept of LoCha: a spatially grouped set of related edits. It validates the whole group together, so that quality checks account for local coherence. E.g, a new building and the driveway added with it are reviewed as one unit, not separately, even if added by different contributors at different points in time.

Main configurable validation filters: - Large geometry change - Monitored tag changes - Monitored tag object deletion - Changes by blacklisted OSM user - Retaining hot changes for a delay

Major changes introduced by 0.5 version

LoCha Engine Redesign: the engine now uses topologically connected changed objects as a finer-grained level, ensuring the coherence of accepted change data. LoCha then uses clustering by distance to other objects to ensure semantic coherence with nearby changes. LoChas are then recursively split to an acceptable size before conflation between the old and new versions of OSM data.

The core of the semantic conflation of before/after OSM changes has been moved to an external library (https://github.com/teritorio/openstreetmap-logical-history), which has its own online tool (start by picking an example): https://teritorio.github.io/openstreetmap-logical-history-component/ .

A new “Delayed” validator was added. It holds back hot changes from synchronization and accepts cold changes automatically, helping to retain disputed or in-progress edits.

An “Invalid Geometry” validator was also added, to catch self-crossing ways or polygons and other geometrical issues.

Database performance was improved, and self-checks for data integrity were added. Because Clearance’s data workflow is not simple, tools and database checks beyond foreign keys were implemented to ensure no data is lost or becomes invalid.

An Atom feed, with filtering capabilities, was added to ease the work of data curators.

This version was partly funded by NGI Zero Core, from the NLnet Foundation.

Still with the support of the NLnet Foundation, the next version will focus on implementing related-object validation: - Duplicate object: avoid introducing duplicate objects into the data. - Network topological changes: avoid breaking network continuity or creating overconnections.

Demo and Source code

Discussion

Leave a comment

Log in to leave a comment