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

update GTFS parser according to the specifications #398

Merged
merged 63 commits into from
Oct 16, 2019

Conversation

patochectp
Copy link
Member

No description provided.

src/gtfs/mod.rs Outdated Show resolved Hide resolved
src/gtfs/mod.rs Outdated Show resolved Hide resolved
src/gtfs/mod.rs Outdated Show resolved Hide resolved
src/gtfs/mod.rs Outdated Show resolved Hide resolved
src/gtfs/mod.rs Outdated Show resolved Hide resolved
src/ntfs/write.rs Outdated Show resolved Hide resolved
src/objects.rs Show resolved Hide resolved
src/objects.rs Show resolved Hide resolved
src/objects.rs Show resolved Hide resolved
src/utils.rs Outdated
@@ -69,6 +69,25 @@ where
Ok(i != 0)
}

pub fn de_from_u8_with_check<'de, D>(deserializer: D) -> Result<bool, D::Error>
Copy link
Contributor

Choose a reason for hiding this comment

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

Why creating a new function? The function just above is doing exactly the same. You could improve the function just above?

Copy link
Contributor

Choose a reason for hiding this comment

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

I created this PR to solve the problem.
patochectp#3

@woshilapin
Copy link
Contributor

There is a function .try_merge() implemented in Collections. Some modifications are needed to merge levels.txt and pathways.txt.

@mergify mergify bot dismissed woshilapin’s stale review October 7, 2019 07:30

Pull request has been modified.

Cargo.toml Outdated Show resolved Hide resolved
src/gtfs/read.rs Outdated
@@ -87,44 +87,170 @@ impl From<Stop> for objects::StopArea {
if let Some(c) = stop.code {
stop_codes.insert(("gtfs_stop_code".to_string(), c));
}
let coord: Coord = Coord::from((stop.lon, stop.lat));
Copy link
Member

Choose a reason for hiding this comment

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

or

let coord: Coord = (stop.lon, stop.lat).into();

src/gtfs/read.rs Outdated Show resolved Hide resolved
src/gtfs/read.rs Outdated Show resolved Hide resolved
src/gtfs/read.rs Outdated Show resolved Hide resolved
src/gtfs/write.rs Outdated Show resolved Hide resolved
src/model.rs Outdated Show resolved Hide resolved
src/ntfs/read.rs Outdated Show resolved Hide resolved
src/ntfs/read.rs Outdated Show resolved Hide resolved
src/objects.rs Show resolved Hide resolved
stop:31,pouet,48.844746,2.372987,0,stoparea:1
stop:32,pouet,48.844746,2.372987,0,stoparea:1
stop:33,pouet,48.844746,2.372987,0,stoparea:1
stop_id,stop_name,stop_lat,stop_lon,location_type,parent_station,level_id

This comment was marked as resolved.

woshilapin
woshilapin previously approved these changes Oct 15, 2019
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.

4 participants