Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances GTFS import/preprocessing to better handle problematic feeds (e.g., stops that can’t be map-matched within tolerance) and adds optional spatial downsampling via an extent filter. It also updates the gtfs-config generator to rely more on typed config serialization and Compass default config loading.
Changes:
- Update
bambam_util gtfs-configto load Compass config viaCompassAppConfig::try_from(...)and build traversal/constraint model JSON from typed structs (plus a"type"tag). - Add GTFS preprocessing that removes trips referencing stops that fail vertex map-matching, and allow filtering entire archives by a user-provided WKT extent.
- Add a
GtfsBundle::empty()constructor and adjust bundle processing to returnOption<GtfsBundle>.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 9 comments.
| File | Description |
|---|---|
| rust/bambam/src/app/gtfs_config/run.rs | Switches to Compass config loading defaults and generates traversal/constraint JSON via typed configs + "type" tagging helper. |
| rust/bambam-gtfs/src/schedule/gtfs_bundle.rs | Adds an empty() constructor for GtfsBundle. |
| rust/bambam-gtfs/src/schedule/bundle_ops.rs | Adds GTFS pre-read filtering (drop trips with disconnected stops), adds optional extent filtering, and changes processing pipeline to return Option<GtfsBundle>. |
| rust/bambam-gtfs/src/schedule/app/operation.rs | Adds --extent-file CLI option, parses WKT geometry, and integrates extent filtering into preprocessing workflow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
yamilbknsu
approved these changes
Mar 4, 2026
Collaborator
yamilbknsu
left a comment
There was a problem hiding this comment.
Looks great, thank you!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
overview
this PR brings additional features to GTFS importing in BAMBAM
bambam_util gtfs-configexplanation
these fixes were used to support running a MEP run for Honolulu, Oahu, Hawaii. the bus system map here includes routes/trips that travel over the tops of the hills in the Koolau Range:
the map data and GTFS stop location data were not aligning within our required distance tolerance of 325 meters, which caused this archive to fail on import. by simply removing trips with stops outside of this threshold, this archive could be imported. the cost here is the lack of simulation of those trips, but, that seems first and foremost to be an issue with our network dataset.