Post-Processing

Post-processing is the final stage of the predicate pipeline, consisting of a single cleanup predicate that maximises match coverage.

Note

Both duplicate propagation (ATLAS groups) and OSM group propagation (platform ↔ stop_position / tram groups) are handled automatically by commit() via the polymorphic entity model. When a representative is matched, all siblings receive propagated match records (duplicate_propagation and osm_group_propagation match types respectively). See § ATLAS Duplicate Grouping.

flowchart TB CTX["MatchingContext"] --> UA["atlas.get_unmatched_records()"] CTX --> OSM["osm.get_by_uic()"] UA --> P1["postpass_unique_uic(ctx)<br/><i>1 ATLAS + 1 OSM (no local_ref) per UIC</i>"] P1 -->|"ctx.commit()"| R1["MatchRecord entities"]

Operations

Predicate match_type Matches Added Description
postpass_unique_uic exact_postpass 248 Match isolated OSM nodes by UIC

Unique-by-UIC Consolidation (postpass_unique_uic)

Catches residual unmatched pairs from originally multi-node UIC groups where local_ref refinement resolved some but not all entries.

Logic: If exactly one unmatched ATLAS entry and exactly one unused OSM node that passes OsmNode.is_station filtering remain for a given UIC, and the OSM node has no local_ref → match them.

Final Statistics

Metric Count
Total matched pairs 60,863
Match rate 88.7%
Remaining unmatched ATLAS 6,200

Code Reference

Function Description
postpass_unique_uic(ctx) Match when only one unused OSM node remains for a UIC

All functions are in postpass_matching.py.

Data update running in background
Preparing update... | Phase: initializing
Data update in progress
Core data is being refreshed. Use this time to read the documentation.
Elapsed: -- ETA: -- Phase: idle