-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
closes #739 hide the `Configuration` needed to read GTFS to have easier hello world and an api closer to the ntfs module. Also add a `gtfs::read` method that detect if the GTFS is a zip or not (like `ntfs::read`). now the canonimal way to read a gtfs is: ```rust let model = transit_model::gtfs::read("path to a zip or directory")?; ``` For better control there is also: ```rust let model = transit_model::gtfs::read_from_path("path to a directory")?; ``` ```rust let model = transit_model::gtfs::read_from_zip("path to a zip")?; ``` or even a `gtfs::from_read` method that takes a reader (cf doc). When a configuration is need a `Reader` struct is needed ```rust let conf = gtfs::Configuration { read_as_line: true, ..Default::default() }; let model = transit_model::gtfs::Reader::new(conf).from(input_dir)?; ```
- Loading branch information
1 parent
6f08bfd
commit a2d0bcd
Showing
6 changed files
with
123 additions
and
52 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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