georust / transitfeed

Public transit serializer/deserializer and manipulation library for Rust
Apache License 2.0
16 stars 4 forks source link

Provide helpers for full feed deliveries #9

Closed medwards closed 6 years ago

medwards commented 6 years ago

Feeds generally come in zip archives so provide a helper that will return all iterators or transit objects for a given archive (or folder).

My current version returns a struct of vectors that contain the successfully deserialized structs, and some indexes to help look up structs by id, but that could be deferred to the user to do.

It would be cool if the structs that result from a full archive referenced each other correctly (so a StopTime contains a reference to a Stop instead of the stop_id). I want to fiddle with enums and see if jointly supporting this is possible but its a stretch idea.

medwards commented 6 years ago

Oops I didn't re-read #5 before opening this.

It should be straightforward to rejig my TransitFeed to have a baseline version that gives iterators on-demand. I'll probably have some layer on top of that that will hold on to transit objects for you and provide helper functions for searching.

teburd commented 6 years ago

I think both are useful, lets move this discussion to #5 though, and talk about what kind of API we want!

Duplicates #5