Skip to content

Commit

Permalink
Merge branch 'master' into stop-point-source
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Oct 9, 2019
2 parents e843e2c + 43cc7da commit 79d12ce
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/add_prefix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ impl AddPrefix for Collections {
self.lines.add_prefix(&prefix);
self.routes.add_prefix(&prefix);
self.vehicle_journeys.add_prefix(&prefix);
self.frequencies.add_prefix(&prefix);
self.stop_areas.add_prefix(&prefix);
self.stop_points.add_prefix(&prefix);
self.calendars.add_prefix(&prefix);
Expand Down
4 changes: 2 additions & 2 deletions src/documentation/gtfs_to_ntfs_specs.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ Like the GTFS, the NTFS group stop_points and stop_areas in on file : stops.txt.
The `parent_station` of the stop_point should then contain the generated `stop_area.id`.

(2) The `stop_code` field is added as a complementary `object_code` with the following properties:
+ `object_type` : _stop_point_ or _stop_area_ accordingly to the `location_type` value
+ `object_type` : `stop_point` or `stop_area` accordingly to the `location_type` value
+ `object_id` : NTFS `stop_id`
+ `object_system` : Fixed value "source"
+ `object_system` : Fixed value `gtfs_stop_code`
+ `object_code` : value of the `stop_code` property

(3) The `comment` object is a complex type with additional properties :
Expand Down
6 changes: 6 additions & 0 deletions src/objects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,12 @@ pub struct Frequency {
pub headway_secs: u32,
}

impl AddPrefix for Frequency {
fn add_prefix(&mut self, prefix: &str) {
self.vehicle_journey_id = prefix.to_string() + &self.vehicle_journey_id;
}
}

#[derive(Debug)]
pub enum TimeError {
WrongFormat,
Expand Down

0 comments on commit 79d12ce

Please sign in to comment.