Skip to content

Implement MOTIS-style GTFS-to-OSM platform matching for OSR FFI - #15

Merged
kylerchin merged 7 commits into
mainfrom
fix/platform-aware-stop-matching-20261030
Oct 31, 2026
Merged

kylerchin merged 7 commits into
mainfrom
fix/platform-aware-stop-matching-20261030

Conversation

@kylerchin

@kylerchin kylerchin commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Expanded implementation

  • Loads optional native OSM platform storage and constructs its spatial index from -p graph extracts.
  • Matches GTFS stop locations against OSM platform node, way, and member geometry. Empty relation platforms cannot be matched because they have no extracted geometry.
  • Ports MOTIS-style feature scoring for stop ID, numeric name/track, exact name, containing ID, platform code, public route tokens, way preference, non-ground-level preference, and geometric proximity.
  • Validates elevated/non-ground platform matches using a reachable pedestrian OSR way at the matched level, limiting false snaps.
  • Exposes a full metadata-aware match_platform FFI method alongside the earlier compatibility method.

Dependencies

Paired backend PR: catenarytransit/catenary-backend#145

Status and remaining verification

Draft; no native CXX build or SoCal real-graph test has completed in this environment. Matching behavior has been implemented from MOTIS sources but has not been verified as bit-for-bit equivalent to MOTIS. OSM relation matching depends on geometry being retained in native platform_ref_. Investigate using original MOTIS get_match as shared native code if API-stable identity is required.

Verification

Compile with pinned OSR revision and GCC 14, test on PBF extracted with -p, test elevated Expo/Sepulveda and alternate side-of-station placements, validate geometries and route-level access times for both directions, and benchmark many-to-one stop matching cost.

@kylerchin kylerchin changed the title Expose optional OSM platform-level lookup for GTFS stop access matching Implement MOTIS-style GTFS-to-OSM platform matching for OSR FFI Oct 31, 2026
@kylerchin
kylerchin marked this pull request as ready for review October 31, 2026 05:41
@kylerchin
kylerchin merged commit 1f3f00e into main Oct 31, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant