Skip to content

feat: add basic support for location_groups #85

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hbruch
Copy link
Contributor

@hbruch hbruch commented Mar 11, 2025

This PR adds basic support for location_groups, a subset of the GTFS-Flex specification, which is now integrated in the GTFS spec.

I.e, it

  • does not list location_groups and location_group_stops as unknown files and validates their columns
  • does not list stops as unused, when they are referenced in a location_group
  • lists the number of location_groups in the stats

Note: this is WIP. Currently only UNSORTED StopTimesDaoMode is supported. I'd nevertheless already get some review feedback of you, @laurentg.

Still to do for the minimal implementation:

  • check for existance of location_group_ids used in stop_times and location_group_stops
  • refactor naming of PackedUnsortedStopTimes DEPTIME_MASK, ARRTIME_MASK, DEPTIME_SHIFT, ARRTIME_SHIFT (or introduce new constants with same values but START_WINDOW/END_WINDOW prefix(?)
  • implement packing also for PackingStopTimes or fall back to PackingUnsortedStopTimes in AutoSwitchStopTimesDao
  • Code formatting (README's developer guide could be extended to include expected formatting)

Additional checks that could be added:

  • endPickupDropOffWindow times are greater or equal to startPickupDropOffWindow
  • conditional required/forbidden values in stop_times, if location_group_id is set/unset
  • ...

hbruch added 2 commits March 11, 2025 10:02
Note: this is WIP. Currently only UNSORTED StopTimesDaoMode is supported.
Signed-off-by: Holger Bruch <[email protected]>
@hbruch hbruch marked this pull request as draft March 11, 2025 09:40
Copy link
Member

@laurentg laurentg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks, excellent!
Looks good to me so far. Nice addition anyway.

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.

2 participants