Skip to content
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

StopTime Aggregator #7

Open
medwards opened this issue Oct 24, 2017 · 1 comment
Open

StopTime Aggregator #7

medwards opened this issue Oct 24, 2017 · 1 comment

Comments

@medwards
Copy link
Collaborator

StopTime structs are not meaningful individually but only when they're grouped by trip. The stop_times.txt file is also not guaranteed to be sorted. It is very useful to have a helper that does this automatically.

I propose a struct Run and a supporting iterator whose constructor groups and sorts the stoptimes for you:

#[derive(Debug, PartialEq)]
pub struct Run
{
    pub trip: &Trip,  // or just trip_id String
    // StopTime is verbose, maybe create a new struct with less fields?
    pub sequence: Vec<StopTime>
}
@teburd
Copy link
Member

teburd commented Nov 5, 2017

I agree, stop times by themselves are pretty useless. This seems like a nice way of doing it!

medwards added a commit to medwards/transitfeed that referenced this issue Nov 7, 2017
@teburd teburd changed the title StopTime agreggator StopTime Aggregator Nov 9, 2017
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

No branches or pull requests

2 participants