-
Notifications
You must be signed in to change notification settings - Fork 28
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
Update Readme #329
Comments
I do agree that the documentation could be improved 😜 It would for example be very nice to see the ergonomic of handling transit data. It's a killer feature, but It's impossible to know it's existence! something like? let transit_data = transit_model::gtfs::read_from_path("./example/", None, None, false).expect("impossible to read GTFS");
// get a stop by it's ID
let stop_area_idx = transit_data
.stop_areas
.get_idx("stoparea:1")
.expect("impossible to find stop area");
println!("routes passing by stop stoparea:1");
// efficiently get all the routes that pass through the stop_area
for route in transit_data
// The rust typesystem is able to guess that we are looking for the routes linked to the stop
// because the Idx are strongly typed, thus route_idx is Idx<Route>
.get_corresponding_from_idx(stop_area_idx)
.into_iter()
.map(|route_idx| &transit_data.routes[route_idx])
{
println!(" - {}", route.name);
} And maybe add a reference to the quite good technical documentation ? |
yes that's the idea |
the readme has been updated but I think we need to provide some examples as you suggest @antoine-de |
pbougue
pushed a commit
to pbougue/transit_model
that referenced
this issue
Aug 27, 2020
pbougue
pushed a commit
to pbougue/transit_model
that referenced
this issue
Aug 27, 2020
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We could have a better Readme
./examples
)The text was updated successfully, but these errors were encountered: