From 9f498a666d5ce67f4c988588907e6f112337dfae Mon Sep 17 00:00:00 2001 From: Jean SIMARD Date: Thu, 10 Sep 2020 17:39:04 +0200 Subject: [PATCH] [feature] Default forbid pickup/dropoff on last/first stop times of vehicle journeys --- .../tests/fixtures/output/stop_times.txt | 8 +- src/model.rs | 395 +++++++++++++++++- src/netex_france/offer.rs | 6 +- .../gtfs2ntfs/full_output/stop_times.txt | 36 +- .../gtfs2ntfs/minimal/output/stop_times.txt | 16 +- .../no_traffic/output/stop_times.txt | 4 +- .../output_with_frequencies/stop_times.txt | 152 +++---- .../output_without_frequencies/stop_times.txt | 16 +- ...offre_5cd0eea3662b0f30bd419b47ecb64840.xml | 8 +- ...icBus_23cdf50ee73fcba0d38beca2d8cc8c0e.xml | 4 +- ...offre_f31e1eef20f64733a18c538073e78396.xml | 8 +- .../ntfs2ntfs/frequencies/stop_times.txt | 24 +- tests/fixtures/ntfs2ntfs/stops/stop_times.txt | 24 +- .../output/stop_times.txt | 20 +- 14 files changed, 557 insertions(+), 164 deletions(-) diff --git a/ntfs2gtfs/tests/fixtures/output/stop_times.txt b/ntfs2gtfs/tests/fixtures/output/stop_times.txt index 6479495ec..98319b6e4 100644 --- a/ntfs2gtfs/tests/fixtures/output/stop_times.txt +++ b/ntfs2gtfs/tests/fixtures/output/stop_times.txt @@ -1,5 +1,5 @@ trip_id,arrival_time,departure_time,stop_id,stop_sequence,pickup_type,drop_off_type,local_zone_id,stop_headsign,timepoint -trip:1,09:00:00,09:00:00,stop:point:1,0,0,0,,,1 -trip:1,09:10:00,09:10:00,stop:point:2,1,0,0,,,1 -trip:3,09:00:00,09:00:00,stop:point:1,0,0,0,,,1 -trip:3,09:00:00,09:00:00,stop:point:2,0,0,0,,,1 +trip:1,09:00:00,09:00:00,stop:point:1,0,0,1,,,1 +trip:1,09:10:00,09:10:00,stop:point:2,1,1,0,,,1 +trip:3,09:00:00,09:00:00,stop:point:1,0,0,1,,,1 +trip:3,09:00:00,09:00:00,stop:point:2,0,1,0,,,1 diff --git a/src/model.rs b/src/model.rs index 0525fee0d..c9e6e9518 100644 --- a/src/model.rs +++ b/src/model.rs @@ -21,7 +21,7 @@ use failure::{bail, format_err}; use geo::algorithm::centroid::Centroid; use geo::MultiPoint; use lazy_static::lazy_static; -use log::{debug, warn, Level as LogLevel}; +use log::{debug, info, warn, Level as LogLevel}; use relational_types::{GetCorresponding, IdxSet, ManyToMany, OneToMany, Relation}; use serde::{Deserialize, Serialize}; use skip_error::skip_error_and_log; @@ -724,6 +724,155 @@ impl Collections { } } + /// Forbid pickup on last stop point of vehicle journeys and forbid dropoff + /// on first stop point of vehicle journeys. + /// + /// However, there is an exception to this rule for authorized stay-in + /// between vehicle journeys. It is possible to get in the last stop point + /// of a vehicle journey or get out on the first stop point of a vehicle + /// journey, if and only if the 2 stop points are different and times do not + /// overlap. + /// + /// WARNING: The current implementation does not handle stay-in for vehicle + /// journeys with different validity patterns. + /// + /// Here is examples explaining the different stay-in situations (for + /// pick-up and drop-off, XX means forbidden, ―▶ means authorized). + /// + /// Example 1: + /// ########## + /// out in out in + /// X SP1 | ▲ SP2 X + /// X ▼ | X + /// VJ:1 08:00-09:00 10:00-11:00 + /// VJ:2 10:00-11:00 14:00-15:00 + /// X ▲ | X + /// X | ▼ SP3 X + /// out in out in + /// |- Stay-In -| + /// + /// Example 2: + /// ########## + /// out in out in + /// X SP1 | ▲ SP2 X + /// X ▼ | X + /// VJ:1 08:00-09:00 10:00---------12:00 + /// VJ:2 11:00----------13:00 13:00-14:00 + /// X ▲ | X + /// X SP3 | ▼ SP4 X + /// out in out in + /// |--------- Stay In ---------| + /// + /// Note the overlap between the departure time of the last stop point SP2 + /// of VJ:1 and the arrival time of the first stop point SP3 of VJ:2. In + /// this case, we still apply the default rule. + /// + /// + /// Example 3: + /// ########## + /// out in out in out in out in + /// X SP1 | ▲ SP2 | ▲ SP3 | ▲ SP4 X + /// X ▼ | ▼ | | | X + /// VJ:1 08:00-09:00 10:00-11:00 | ▼ | X + /// VJ:2 12:00-13:00 14:00-15:00 + /// |---------- Stay In ---------| + /// + /// Example 3 is the only case were we allow specific pick-up and + /// drop-off. + /// + /// Example 4: + /// ########## + /// SP0 SP1 SP2 SP3 + /// + /// VJ:1 (Mon-Sun) 09:00-10:00 10:00-11:00 + /// VJ:2 (Mon-Fri) 12:00-13:00 14:00-15:00 + /// VJ:3 (Sat-Sun) 12:30-13:30 14:30-15:30 + /// + /// Example 4 might be a valid use case of stay-in but is not handled in the + /// current implementation since the validity patterns are different; this + /// is undefined behavior (most likely, some stay-in will be forbidden by + /// the default rule). + pub fn enhance_pickup_dropoff(&mut self) { + let mut vj_idxs: Vec> = self + .vehicle_journeys + .iter() + // Filtering out vehicle journeys without any stop time allowing us + // below to access first and last stop_times safely. + .filter(|(_, vj)| !vj.stop_times.is_empty()) + .map(|(idx, _)| idx) + .collect(); + // Init all vehicle journeys with: + // - no drop-off on first stop + // - no pick-up on last stop + for vj_idx in &vj_idxs { + let mut vehicle_journey = self.vehicle_journeys.index_mut(*vj_idx); + vehicle_journey + .stop_times + .first_mut() + .unwrap() + .drop_off_type = 1; + vehicle_journey.stop_times.last_mut().unwrap().pickup_type = 1; + } + // Keep only vehicle journeys with a `block_id` (concerned with + // stay-in). + vj_idxs.retain(|vj_idx| self.vehicle_journeys[*vj_idx].block_id.is_some()); + // Sort the vehicule journeys by block_id, and if equal, order them by + // departure time. + vj_idxs.sort_by(|vj1_idx, vj2_idx| { + let vj1 = &self.vehicle_journeys[*vj1_idx]; + let vj2 = &self.vehicle_journeys[*vj2_idx]; + match vj1.block_id.cmp(&vj2.block_id) { + Ordering::Equal => vj1 + .stop_times + .first() + .unwrap() + .departure_time + .cmp(&vj2.stop_times.first().unwrap().departure_time), + ordering => ordering, + } + }); + for (prev_vj_idx, next_vj_idx) in vj_idxs.iter().zip(vj_idxs.iter().skip(1)) { + let prev_vj = &self.vehicle_journeys[*prev_vj_idx]; + let next_vj = &self.vehicle_journeys[*next_vj_idx]; + if prev_vj.block_id != next_vj.block_id { + // we can discard when two vehicle journeys are not in a stay-in + // situation. + continue; + } + let last_stop = &prev_vj.stop_times.last().unwrap(); + let first_stop = &next_vj.stop_times.first().unwrap(); + if last_stop.stop_point_idx == first_stop.stop_point_idx { + // We can discard when the stop points are identicals (see + // Example 1 above). + continue; + } + if last_stop.departure_time > first_stop.arrival_time { + // We can discard when timing overlaps between arrival of first + // vehicle journey and departure of next vehicle journey (see + // Example 2 above). + continue; + } + // We're now in Example 3 (see above), let's allow pick-up and + // drop-off on stay-in situations. + // Note: Original value might have been either 0 (authorized) or 2 + // (on-demand-transport), but we're putting back 0 so there is + // a possible degradation of information. + info!("Enabling pick-up on last stop time of vehicle journey '{}' and drop-off on first stop time of vehicle journey '{}' (stay-in).", prev_vj.id, next_vj.id); + self.vehicle_journeys + .index_mut(*prev_vj_idx) + .stop_times + .last_mut() + .unwrap() + .pickup_type = 0; + self.vehicle_journeys + .index_mut(*next_vj_idx) + .stop_times + .first_mut() + .unwrap() + .drop_off_type = 0; + } + } + /// Trip headsign can be derived from the name of the stop point of the /// last stop time of the associated trip. pub fn enhance_trip_headsign(&mut self) { @@ -1302,6 +1451,7 @@ impl Model { c.enhance_route_directions(); c.check_geometries_coherence(); c.enhance_line_opening_time(); + c.enhance_pickup_dropoff(); Ok(Model { routes_to_stop_points, @@ -1438,6 +1588,249 @@ mod tests { } } + mod enhance_pickup_dropoff { + use super::*; + use pretty_assertions::assert_eq; + + // For testing, we need to configure: + // - block_id (String) + // - stop_point_idx (usize -> index of one of the four test stop points) + // - arrival_time (Time) + // - departure_time (Time) + type VJConfig = (String, usize, Time, Time); + + // This creates 2 vehicle journeys, each with 2 stop times. There is 4 + // available test stop points 'sp0' ―▶ 'sp3'. First vehicle journey has + // a first stop time with 'sp0' and second stop time configurable with + // 'prev_vj_config'. Second vehicle journey has a first stop time + // configurable with 'next_vj_config' and second stop time with 'sp3'. + fn build_vehicle_journeys( + prev_vj_config: VJConfig, + next_vj_config: VJConfig, + ) -> CollectionWithId { + let mut stop_points = CollectionWithId::default(); + let mut sp_idxs = Vec::new(); + for i in 0..4 { + let idx = stop_points + .push(StopPoint { + id: format!("sp{}", i), + ..Default::default() + }) + .unwrap(); + sp_idxs.push(idx); + } + // First vehicle journey, first stop time + let stop_time_1 = StopTime { + stop_point_idx: sp_idxs[0], + sequence: 0, + arrival_time: prev_vj_config.2 - Time::new(1, 0, 0), + departure_time: prev_vj_config.3 - Time::new(1, 0, 0), + boarding_duration: 0, + alighting_duration: 0, + pickup_type: 0, + drop_off_type: 0, + datetime_estimated: false, + local_zone_id: None, + precision: None, + }; + // First vehicle journey, second stop time + let stop_time_2 = StopTime { + stop_point_idx: sp_idxs[prev_vj_config.1], + sequence: 0, + arrival_time: prev_vj_config.2, + departure_time: prev_vj_config.3, + boarding_duration: 0, + alighting_duration: 0, + pickup_type: 0, + drop_off_type: 0, + datetime_estimated: false, + local_zone_id: None, + precision: None, + }; + // Second vehicle journey, first stop time + let next_vj_config_time_1 = StopTime { + stop_point_idx: sp_idxs[next_vj_config.1], + sequence: 1, + arrival_time: next_vj_config.2, + departure_time: next_vj_config.3, + boarding_duration: 0, + alighting_duration: 0, + pickup_type: 0, + drop_off_type: 0, + datetime_estimated: false, + local_zone_id: None, + precision: None, + }; + // Second vehicle journey, second stop time + let next_vj_config_time_2 = StopTime { + stop_point_idx: sp_idxs[3], + sequence: 1, + arrival_time: next_vj_config.2 + Time::new(1, 0, 0), + departure_time: next_vj_config.3 + Time::new(1, 0, 0), + boarding_duration: 0, + alighting_duration: 0, + pickup_type: 0, + drop_off_type: 0, + datetime_estimated: false, + local_zone_id: None, + precision: None, + }; + + let vj1 = VehicleJourney { + id: "vj1".to_string(), + block_id: Some(prev_vj_config.0), + stop_times: vec![stop_time_1, stop_time_2], + ..Default::default() + }; + let vj2 = VehicleJourney { + id: "vj2".to_string(), + block_id: Some(next_vj_config.0), + stop_times: vec![next_vj_config_time_1, next_vj_config_time_2], + ..Default::default() + }; + CollectionWithId::new(vec![vj1, vj2]).unwrap() + } + + #[test] + fn no_stay_in() { + let mut collections = Collections::default(); + let stop_config = ( + "block_id_1".to_string(), + 1, + Time::new(10, 0, 0), + Time::new(11, 0, 0), + ); + let next_vj_config_config = ( + "block_id_2".to_string(), + 2, + Time::new(10, 0, 0), + Time::new(11, 0, 0), + ); + collections.vehicle_journeys = + build_vehicle_journeys(stop_config, next_vj_config_config); + collections.enhance_pickup_dropoff(); + let vj1 = collections.vehicle_journeys.get("vj1").unwrap(); + let stop_time = &vj1.stop_times[0]; + assert_eq!(0, stop_time.pickup_type); + assert_eq!(1, stop_time.drop_off_type); + let stop_time = &vj1.stop_times[vj1.stop_times.len() - 1]; + assert_eq!(1, stop_time.pickup_type); + assert_eq!(0, stop_time.drop_off_type); + let vj2 = collections.vehicle_journeys.get("vj2").unwrap(); + let stop_time = &vj2.stop_times[0]; + assert_eq!(0, stop_time.pickup_type); + assert_eq!(1, stop_time.drop_off_type); + let stop_time = &vj2.stop_times[vj2.stop_times.len() - 1]; + assert_eq!(1, stop_time.pickup_type); + assert_eq!(0, stop_time.drop_off_type); + } + + // Example 1 + #[test] + fn stay_in_same_stop() { + let mut collections = Collections::default(); + let stop_config = ( + "block_id_1".to_string(), + 1, + Time::new(10, 0, 0), + Time::new(11, 0, 0), + ); + let next_vj_config_config = ( + "block_id_1".to_string(), + 1, + Time::new(10, 0, 0), + Time::new(11, 0, 0), + ); + collections.vehicle_journeys = + build_vehicle_journeys(stop_config, next_vj_config_config); + collections.enhance_pickup_dropoff(); + let vj1 = collections.vehicle_journeys.get("vj1").unwrap(); + let stop_time = &vj1.stop_times[0]; + assert_eq!(0, stop_time.pickup_type); + assert_eq!(1, stop_time.drop_off_type); + let stop_time = &vj1.stop_times[vj1.stop_times.len() - 1]; + assert_eq!(1, stop_time.pickup_type); + assert_eq!(0, stop_time.drop_off_type); + let vj2 = collections.vehicle_journeys.get("vj2").unwrap(); + let stop_time = &vj2.stop_times[0]; + assert_eq!(0, stop_time.pickup_type); + assert_eq!(1, stop_time.drop_off_type); + let stop_time = &vj2.stop_times[vj2.stop_times.len() - 1]; + assert_eq!(1, stop_time.pickup_type); + assert_eq!(0, stop_time.drop_off_type); + } + + // Example 2 + #[test] + fn stay_in_different_stop_overlapping_time() { + let mut collections = Collections::default(); + let stop_config = ( + "block_id_1".to_string(), + 1, + Time::new(10, 0, 0), + Time::new(12, 0, 0), + ); + let next_vj_config_config = ( + "block_id_1".to_string(), + 2, + Time::new(11, 0, 0), + Time::new(13, 0, 0), + ); + collections.vehicle_journeys = + build_vehicle_journeys(stop_config, next_vj_config_config); + collections.enhance_pickup_dropoff(); + let vj1 = collections.vehicle_journeys.get("vj1").unwrap(); + let stop_time = &vj1.stop_times[0]; + assert_eq!(0, stop_time.pickup_type); + assert_eq!(1, stop_time.drop_off_type); + let stop_time = &vj1.stop_times[vj1.stop_times.len() - 1]; + assert_eq!(1, stop_time.pickup_type); + assert_eq!(0, stop_time.drop_off_type); + let vj2 = collections.vehicle_journeys.get("vj2").unwrap(); + let stop_time = &vj2.stop_times[0]; + assert_eq!(0, stop_time.pickup_type); + assert_eq!(1, stop_time.drop_off_type); + let stop_time = &vj2.stop_times[vj2.stop_times.len() - 1]; + assert_eq!(1, stop_time.pickup_type); + assert_eq!(0, stop_time.drop_off_type); + } + + // Example 3 + #[test] + fn stay_in_different_stop() { + let mut collections = Collections::default(); + let stop_config = ( + "block_id_1".to_string(), + 1, + Time::new(10, 0, 0), + Time::new(11, 0, 0), + ); + let next_vj_config_config = ( + "block_id_1".to_string(), + 2, + Time::new(12, 0, 0), + Time::new(13, 0, 0), + ); + collections.vehicle_journeys = + build_vehicle_journeys(stop_config, next_vj_config_config); + collections.enhance_pickup_dropoff(); + let vj1 = collections.vehicle_journeys.get("vj1").unwrap(); + let stop_time = &vj1.stop_times[0]; + assert_eq!(0, stop_time.pickup_type); + assert_eq!(1, stop_time.drop_off_type); + let stop_time = &vj1.stop_times[vj1.stop_times.len() - 1]; + assert_eq!(0, stop_time.pickup_type); + assert_eq!(0, stop_time.drop_off_type); + let vj2 = collections.vehicle_journeys.get("vj2").unwrap(); + let stop_time = &vj2.stop_times[0]; + assert_eq!(0, stop_time.pickup_type); + assert_eq!(0, stop_time.drop_off_type); + let stop_time = &vj2.stop_times[vj2.stop_times.len() - 1]; + assert_eq!(1, stop_time.pickup_type); + assert_eq!(0, stop_time.drop_off_type); + } + } + mod enhance_trip_headsign { use super::*; use pretty_assertions::assert_eq; diff --git a/src/netex_france/offer.rs b/src/netex_france/offer.rs index 16cfbbfb9..ff4aaa634 100644 --- a/src/netex_france/offer.rs +++ b/src/netex_france/offer.rs @@ -954,7 +954,8 @@ mod tests { departure_time: Time::new(0, 0, 0), boarding_duration: 0, alighting_duration: 0, - pickup_type: 0, + // This pickup type is different from 'vj_id_1' + pickup_type: 1, drop_off_type: 0, datetime_estimated: false, local_zone_id: Some(1), @@ -967,8 +968,7 @@ mod tests { departure_time: Time::new(0, 0, 0), boarding_duration: 0, alighting_duration: 0, - // This pickup type is different from 'vj_id_1' - pickup_type: 0, + pickup_type: 1, drop_off_type: 1, datetime_estimated: false, local_zone_id: Some(1), diff --git a/tests/fixtures/gtfs2ntfs/full_output/stop_times.txt b/tests/fixtures/gtfs2ntfs/full_output/stop_times.txt index f13777859..7d2bad7ec 100644 --- a/tests/fixtures/gtfs2ntfs/full_output/stop_times.txt +++ b/tests/fixtures/gtfs2ntfs/full_output/stop_times.txt @@ -1,27 +1,27 @@ stop_id,trip_id,stop_sequence,arrival_time,departure_time,boarding_duration,alighting_duration,pickup_type,drop_off_type,datetime_estimated,local_zone_id,stop_headsign,stop_time_id,stop_time_precision -ME:stop:11,ME:WINTER:trip:4-0,0,20:00:00,20:00:00,0,0,2,0,1,,,,0 -ME:stop:11,ME:WINTER:trip:4-1,0,20:30:00,20:30:00,0,0,2,0,1,,,,0 -ME:stop:11,ME:WINTER:trip:4-2,0,21:00:00,21:00:00,0,0,2,0,1,,,,0 -ME:stop:11,ME:WINTER:trip:4-3,0,21:30:00,21:30:00,0,0,2,0,1,,,,0 +ME:stop:11,ME:WINTER:trip:4-0,0,20:00:00,20:00:00,0,0,2,1,1,,,,0 +ME:stop:11,ME:WINTER:trip:4-1,0,20:30:00,20:30:00,0,0,2,1,1,,,,0 +ME:stop:11,ME:WINTER:trip:4-2,0,21:00:00,21:00:00,0,0,2,1,1,,,,0 +ME:stop:11,ME:WINTER:trip:4-3,0,21:30:00,21:30:00,0,0,2,1,1,,,,0 ME:stop:22,ME:WINTER:trip:4-0,1,20:09:00,20:09:00,0,0,2,0,1,,,,0 ME:stop:22,ME:WINTER:trip:4-1,1,20:39:00,20:39:00,0,0,2,0,1,,,,0 ME:stop:22,ME:WINTER:trip:4-2,1,21:09:00,21:09:00,0,0,2,0,1,,,,0 ME:stop:22,ME:WINTER:trip:4-3,1,21:39:00,21:39:00,0,0,2,0,1,,,,0 -ME:stop:31,ME:WINTER:trip:3-0,0,10:00:00,10:00:00,0,0,0,0,0,,,,0 +ME:stop:31,ME:WINTER:trip:3-0,0,10:00:00,10:00:00,0,0,0,1,0,,,,0 ME:stop:32,ME:WINTER:trip:3-0,1,10:13:00,10:15:00,0,0,0,0,0,,,,0 -ME:stop:33,ME:WINTER:trip:3-0,2,10:20:00,10:25:00,0,0,0,0,0,,,,0 -ME:stop:33,ME:WINTER:trip:4-0,2,20:17:00,20:19:00,0,0,2,0,1,,,,0 -ME:stop:33,ME:WINTER:trip:4-1,2,20:47:00,20:49:00,0,0,2,0,1,,,,0 -ME:stop:33,ME:WINTER:trip:4-2,2,21:17:00,21:19:00,0,0,2,0,1,,,,0 -ME:stop:33,ME:WINTER:trip:4-3,2,21:47:00,21:49:00,0,0,2,0,1,,,,0 -ME:stop:51,ME:WINTER:trip:5-0,0,23:00:00,23:00:00,0,0,2,0,0,,,,0 -ME:stop:51,ME:WINTER:trip:5-1,0,23:50:00,23:50:00,0,0,2,0,0,,,,0 -ME:stop:51,ME:WINTER:trip:5-2,0,00:40:00,00:40:00,0,0,2,0,0,,,,0 +ME:stop:33,ME:WINTER:trip:3-0,2,10:20:00,10:25:00,0,0,1,0,0,,,,0 +ME:stop:33,ME:WINTER:trip:4-0,2,20:17:00,20:19:00,0,0,1,0,1,,,,0 +ME:stop:33,ME:WINTER:trip:4-1,2,20:47:00,20:49:00,0,0,1,0,1,,,,0 +ME:stop:33,ME:WINTER:trip:4-2,2,21:17:00,21:19:00,0,0,1,0,1,,,,0 +ME:stop:33,ME:WINTER:trip:4-3,2,21:47:00,21:49:00,0,0,1,0,1,,,,0 +ME:stop:51,ME:WINTER:trip:5-0,0,23:00:00,23:00:00,0,0,2,1,0,,,,0 +ME:stop:51,ME:WINTER:trip:5-1,0,23:50:00,23:50:00,0,0,2,1,0,,,,0 +ME:stop:51,ME:WINTER:trip:5-2,0,00:40:00,00:40:00,0,0,2,1,0,,,,0 ME:stop:52,ME:WINTER:trip:5-0,1,23:47:00,23:47:00,0,0,2,0,0,,,,0 ME:stop:52,ME:WINTER:trip:5-1,1,24:37:00,24:37:00,0,0,2,0,0,,,,0 ME:stop:52,ME:WINTER:trip:5-2,1,01:27:00,01:27:00,0,0,2,0,0,,,,0 -ME:stop:53,ME:WINTER:trip:5-0,2,24:17:00,24:17:00,0,0,0,2,0,,,,0 -ME:stop:53,ME:WINTER:trip:5-1,2,25:07:00,25:07:00,0,0,0,2,0,,,,0 -ME:stop:53,ME:WINTER:trip:5-2,2,01:57:00,01:57:00,0,0,0,2,0,,,,0 -ME:stop:61,ME:WINTER:trip:6,0,14:40:00,14:40:00,0,0,2,0,0,,,,0 -ME:stop:61,ME:WINTER:trip:6,1,15:20:00,15:20:00,0,0,2,0,0,,,,0 +ME:stop:53,ME:WINTER:trip:5-0,2,24:17:00,24:17:00,0,0,1,2,0,,,,0 +ME:stop:53,ME:WINTER:trip:5-1,2,25:07:00,25:07:00,0,0,1,2,0,,,,0 +ME:stop:53,ME:WINTER:trip:5-2,2,01:57:00,01:57:00,0,0,1,2,0,,,,0 +ME:stop:61,ME:WINTER:trip:6,0,14:40:00,14:40:00,0,0,2,1,0,,,,0 +ME:stop:61,ME:WINTER:trip:6,1,15:20:00,15:20:00,0,0,1,0,0,,,,0 diff --git a/tests/fixtures/gtfs2ntfs/minimal/output/stop_times.txt b/tests/fixtures/gtfs2ntfs/minimal/output/stop_times.txt index 71bd6e477..1855f7982 100644 --- a/tests/fixtures/gtfs2ntfs/minimal/output/stop_times.txt +++ b/tests/fixtures/gtfs2ntfs/minimal/output/stop_times.txt @@ -1,12 +1,12 @@ stop_id,trip_id,stop_sequence,arrival_time,departure_time,boarding_duration,alighting_duration,pickup_type,drop_off_type,datetime_estimated,local_zone_id,stop_headsign,stop_time_id,stop_time_precision -stop:11,trip:4,0,07:23:00,07:23:00,0,0,2,0,0,,,,0 +stop:11,trip:4,0,07:23:00,07:23:00,0,0,2,1,0,,,,0 stop:22,trip:4,1,07:32:00,07:32:00,0,0,2,0,0,,,,0 -stop:33,trip:4,2,07:40:00,07:42:00,0,0,2,0,0,,,,0 -stop:51,trip:5,0,13:23:00,13:23:00,0,0,2,0,0,,,,0 +stop:33,trip:4,2,07:40:00,07:42:00,0,0,1,0,0,,,,0 +stop:51,trip:5,0,13:23:00,13:23:00,0,0,2,1,0,,,,0 stop:52,trip:5,1,14:10:00,14:10:00,0,0,2,0,0,,,,0 -stop:53,trip:5,2,14:40:00,14:40:00,0,0,0,2,0,,,,0 -stop:31,trip:3,0,23:50:00,23:50:00,0,0,0,0,0,,,,0 +stop:53,trip:5,2,14:40:00,14:40:00,0,0,1,2,0,,,,0 +stop:31,trip:3,0,23:50:00,23:50:00,0,0,0,1,0,,,,0 stop:32,trip:3,1,24:03:00,24:05:00,0,0,0,0,0,,,,0 -stop:33,trip:3,2,24:10:00,24:15:00,0,0,0,0,0,,,,0 -stop:61,trip:6,0,14:40:00,14:40:00,0,0,2,0,0,,,,0 -stop:61,trip:6,1,15:20:00,15:20:00,0,0,2,0,0,,,,0 +stop:33,trip:3,2,24:10:00,24:15:00,0,0,1,0,0,,,,0 +stop:61,trip:6,0,14:40:00,14:40:00,0,0,2,1,0,,,,0 +stop:61,trip:6,1,15:20:00,15:20:00,0,0,1,0,0,,,,0 diff --git a/tests/fixtures/gtfs2ntfs/no_traffic/output/stop_times.txt b/tests/fixtures/gtfs2ntfs/no_traffic/output/stop_times.txt index 7eee8ed59..ff7c8ec95 100644 --- a/tests/fixtures/gtfs2ntfs/no_traffic/output/stop_times.txt +++ b/tests/fixtures/gtfs2ntfs/no_traffic/output/stop_times.txt @@ -1,3 +1,3 @@ stop_id,trip_id,stop_sequence,arrival_time,departure_time,boarding_duration,alighting_duration,pickup_type,drop_off_type,datetime_estimated,local_zone_id,stop_headsign,stop_time_id,stop_time_precision -stop:31,trip:3,0,23:50:00,23:50:00,0,0,0,0,0,,,,0 -stop:33,trip:3,2,24:10:00,24:15:00,0,0,0,0,0,,,,0 +stop:31,trip:3,0,23:50:00,23:50:00,0,0,0,1,0,,,,0 +stop:33,trip:3,2,24:10:00,24:15:00,0,0,1,0,0,,,,0 diff --git a/tests/fixtures/gtfs2ntfs/odt_comment/output_with_frequencies/stop_times.txt b/tests/fixtures/gtfs2ntfs/odt_comment/output_with_frequencies/stop_times.txt index f690cd1a9..3bb5fc992 100644 --- a/tests/fixtures/gtfs2ntfs/odt_comment/output_with_frequencies/stop_times.txt +++ b/tests/fixtures/gtfs2ntfs/odt_comment/output_with_frequencies/stop_times.txt @@ -1,113 +1,113 @@ stop_id,trip_id,stop_sequence,arrival_time,departure_time,boarding_duration,alighting_duration,pickup_type,drop_off_type,datetime_estimated,local_zone_id,stop_headsign,stop_time_id,stop_time_precision -test:stop:11,test:trip:1-13,0,17:55:00,17:57:00,0,0,0,0,1,,,,0 +test:stop:11,test:trip:1-13,0,17:55:00,17:57:00,0,0,0,1,1,,,,0 test:stop:12,test:trip:1-13,1,18:10:00,18:13:00,0,0,0,0,1,,,,0 test:stop:13,test:trip:1-13,2,18:25:00,18:25:00,0,0,2,0,1,,,test:trip:1-13-2,0 -test:stop:14,test:trip:1-13,3,18:35:00,18:35:00,0,0,0,2,1,,,test:trip:1-13-3,0 -test:stop:21,test:trip:2-11,0,15:55:00,15:55:00,0,0,0,0,0,,,,0 -test:stop:22,test:trip:2-11,1,16:00:00,16:00:00,0,0,0,0,0,,,,0 -test:stop:21,test:trip:2-10,0,15:45:00,15:45:00,0,0,0,0,0,,,,0 -test:stop:22,test:trip:2-10,1,15:50:00,15:50:00,0,0,0,0,0,,,,0 -test:stop:21,test:trip:2-1,0,14:15:00,14:15:00,0,0,0,0,0,,,,0 -test:stop:22,test:trip:2-1,1,14:20:00,14:20:00,0,0,0,0,0,,,,0 -test:stop:11,test:trip:1-7,0,17:25:00,17:27:00,0,0,0,0,1,,,,0 +test:stop:14,test:trip:1-13,3,18:35:00,18:35:00,0,0,1,2,1,,,test:trip:1-13-3,0 +test:stop:21,test:trip:2-11,0,15:55:00,15:55:00,0,0,0,1,0,,,,0 +test:stop:22,test:trip:2-11,1,16:00:00,16:00:00,0,0,1,0,0,,,,0 +test:stop:21,test:trip:2-10,0,15:45:00,15:45:00,0,0,0,1,0,,,,0 +test:stop:22,test:trip:2-10,1,15:50:00,15:50:00,0,0,1,0,0,,,,0 +test:stop:21,test:trip:2-1,0,14:15:00,14:15:00,0,0,0,1,0,,,,0 +test:stop:22,test:trip:2-1,1,14:20:00,14:20:00,0,0,1,0,0,,,,0 +test:stop:11,test:trip:1-7,0,17:25:00,17:27:00,0,0,0,1,1,,,,0 test:stop:12,test:trip:1-7,1,17:40:00,17:43:00,0,0,0,0,1,,,,0 test:stop:13,test:trip:1-7,2,17:55:00,17:55:00,0,0,2,0,1,,,test:trip:1-7-2,0 -test:stop:14,test:trip:1-7,3,18:05:00,18:05:00,0,0,0,2,1,,,test:trip:1-7-3,0 -test:stop:11,test:trip:1-1,0,07:30:00,07:32:00,0,0,0,0,1,,,,0 +test:stop:14,test:trip:1-7,3,18:05:00,18:05:00,0,0,1,2,1,,,test:trip:1-7-3,0 +test:stop:11,test:trip:1-1,0,07:30:00,07:32:00,0,0,0,1,1,,,,0 test:stop:12,test:trip:1-1,1,07:45:00,07:48:00,0,0,0,0,1,,,,0 test:stop:13,test:trip:1-1,2,08:00:00,08:00:00,0,0,2,0,1,,,test:trip:1-1-2,0 -test:stop:14,test:trip:1-1,3,08:10:00,08:10:00,0,0,0,2,1,,,test:trip:1-1-3,0 -test:stop:31,test:trip:3-0,0,10:00:00,10:00:00,0,0,0,0,0,,,,0 +test:stop:14,test:trip:1-1,3,08:10:00,08:10:00,0,0,1,2,1,,,test:trip:1-1-3,0 +test:stop:31,test:trip:3-0,0,10:00:00,10:00:00,0,0,0,1,0,,,,0 test:stop:32,test:trip:3-0,1,10:13:00,10:15:00,0,0,0,0,0,,,,0 -test:stop:33,test:trip:3-0,2,10:20:00,10:25:00,0,0,0,0,0,,,,0 -test:stop:51,test:trip:5-1,0,23:50:00,23:50:00,0,0,0,0,0,,,,0 +test:stop:33,test:trip:3-0,2,10:20:00,10:25:00,0,0,1,0,0,,,,0 +test:stop:51,test:trip:5-1,0,23:50:00,23:50:00,0,0,0,1,0,,,,0 test:stop:52,test:trip:5-1,1,24:37:00,24:37:00,0,0,0,0,0,,,,0 -test:stop:53,test:trip:5-1,2,25:07:00,25:07:00,0,0,0,0,0,,,,0 -test:stop:11,test:trip:1-0,0,07:00:00,07:02:00,0,0,0,0,1,,,,0 +test:stop:53,test:trip:5-1,2,25:07:00,25:07:00,0,0,1,0,0,,,,0 +test:stop:11,test:trip:1-0,0,07:00:00,07:02:00,0,0,0,1,1,,,,0 test:stop:12,test:trip:1-0,1,07:15:00,07:18:00,0,0,0,0,1,,,,0 test:stop:13,test:trip:1-0,2,07:30:00,07:30:00,0,0,2,0,1,,,test:trip:1-0-2,0 -test:stop:14,test:trip:1-0,3,07:40:00,07:40:00,0,0,0,2,1,,,test:trip:1-0-3,0 -test:stop:11,test:trip:1-4,0,17:10:00,17:12:00,0,0,0,0,1,,,,0 +test:stop:14,test:trip:1-0,3,07:40:00,07:40:00,0,0,1,2,1,,,test:trip:1-0-3,0 +test:stop:11,test:trip:1-4,0,17:10:00,17:12:00,0,0,0,1,1,,,,0 test:stop:12,test:trip:1-4,1,17:25:00,17:28:00,0,0,0,0,1,,,,0 test:stop:13,test:trip:1-4,2,17:40:00,17:40:00,0,0,2,0,1,,,test:trip:1-4-2,0 -test:stop:14,test:trip:1-4,3,17:50:00,17:50:00,0,0,0,2,1,,,test:trip:1-4-3,0 -test:stop:21,test:trip:2-2,0,14:25:00,14:25:00,0,0,0,0,0,,,,0 -test:stop:22,test:trip:2-2,1,14:30:00,14:30:00,0,0,0,0,0,,,,0 -test:stop:11,test:trip:1-11,0,17:45:00,17:47:00,0,0,0,0,1,,,,0 +test:stop:14,test:trip:1-4,3,17:50:00,17:50:00,0,0,1,2,1,,,test:trip:1-4-3,0 +test:stop:21,test:trip:2-2,0,14:25:00,14:25:00,0,0,0,1,0,,,,0 +test:stop:22,test:trip:2-2,1,14:30:00,14:30:00,0,0,1,0,0,,,,0 +test:stop:11,test:trip:1-11,0,17:45:00,17:47:00,0,0,0,1,1,,,,0 test:stop:12,test:trip:1-11,1,18:00:00,18:03:00,0,0,0,0,1,,,,0 test:stop:13,test:trip:1-11,2,18:15:00,18:15:00,0,0,2,0,1,,,test:trip:1-11-2,0 -test:stop:14,test:trip:1-11,3,18:25:00,18:25:00,0,0,0,2,1,,,test:trip:1-11-3,0 -test:stop:21,test:trip:2-9,0,15:35:00,15:35:00,0,0,0,0,0,,,,0 -test:stop:22,test:trip:2-9,1,15:40:00,15:40:00,0,0,0,0,0,,,,0 -test:stop:11,test:trip:1-5,0,17:15:00,17:17:00,0,0,0,0,1,,,,0 +test:stop:14,test:trip:1-11,3,18:25:00,18:25:00,0,0,1,2,1,,,test:trip:1-11-3,0 +test:stop:21,test:trip:2-9,0,15:35:00,15:35:00,0,0,0,1,0,,,,0 +test:stop:22,test:trip:2-9,1,15:40:00,15:40:00,0,0,1,0,0,,,,0 +test:stop:11,test:trip:1-5,0,17:15:00,17:17:00,0,0,0,1,1,,,,0 test:stop:12,test:trip:1-5,1,17:30:00,17:33:00,0,0,0,0,1,,,,0 test:stop:13,test:trip:1-5,2,17:45:00,17:45:00,0,0,2,0,1,,,test:trip:1-5-2,0 -test:stop:14,test:trip:1-5,3,17:55:00,17:55:00,0,0,0,2,1,,,test:trip:1-5-3,0 -test:stop:21,test:trip:2-6,0,15:05:00,15:05:00,0,0,0,0,0,,,,0 -test:stop:22,test:trip:2-6,1,15:10:00,15:10:00,0,0,0,0,0,,,,0 -test:stop:11,test:trip:4-1,0,20:30:00,20:30:00,0,0,0,0,1,,,,0 +test:stop:14,test:trip:1-5,3,17:55:00,17:55:00,0,0,1,2,1,,,test:trip:1-5-3,0 +test:stop:21,test:trip:2-6,0,15:05:00,15:05:00,0,0,0,1,0,,,,0 +test:stop:22,test:trip:2-6,1,15:10:00,15:10:00,0,0,1,0,0,,,,0 +test:stop:11,test:trip:4-1,0,20:30:00,20:30:00,0,0,0,1,1,,,,0 test:stop:22,test:trip:4-1,1,20:39:00,20:39:00,0,0,0,0,1,,,,0 -test:stop:33,test:trip:4-1,2,20:47:00,20:49:00,0,0,0,0,1,,,,0 -test:stop:71,test:trip:russian-1,0,03:00:00,03:00:00,0,0,0,0,0,,,,0 -test:stop:72,test:trip:russian-1,1,05:00:00,05:00:00,0,0,0,0,0,,,,0 -test:stop:21,test:trip:2-7,0,15:15:00,15:15:00,0,0,0,0,0,,,,0 -test:stop:22,test:trip:2-7,1,15:20:00,15:20:00,0,0,0,0,0,,,,0 -test:stop:11,test:trip:4-2,0,21:00:00,21:00:00,0,0,0,0,1,,,,0 +test:stop:33,test:trip:4-1,2,20:47:00,20:49:00,0,0,1,0,1,,,,0 +test:stop:71,test:trip:russian-1,0,03:00:00,03:00:00,0,0,0,1,0,,,,0 +test:stop:72,test:trip:russian-1,1,05:00:00,05:00:00,0,0,1,0,0,,,,0 +test:stop:21,test:trip:2-7,0,15:15:00,15:15:00,0,0,0,1,0,,,,0 +test:stop:22,test:trip:2-7,1,15:20:00,15:20:00,0,0,1,0,0,,,,0 +test:stop:11,test:trip:4-2,0,21:00:00,21:00:00,0,0,0,1,1,,,,0 test:stop:22,test:trip:4-2,1,21:09:00,21:09:00,0,0,0,0,1,,,,0 -test:stop:33,test:trip:4-2,2,21:17:00,21:19:00,0,0,0,0,1,,,,0 -test:stop:21,test:trip:2-4,0,14:45:00,14:45:00,0,0,0,0,0,,,,0 -test:stop:22,test:trip:2-4,1,14:50:00,14:50:00,0,0,0,0,0,,,,0 -test:stop:71,test:trip:russian-3,0,03:00:00,03:00:00,0,0,0,0,0,,,,0 -test:stop:72,test:trip:russian-3,1,05:00:00,05:00:00,0,0,0,0,0,,,,0 -test:stop:11,test:trip:1-3,0,17:05:00,17:07:00,0,0,0,0,1,,,,0 +test:stop:33,test:trip:4-2,2,21:17:00,21:19:00,0,0,1,0,1,,,,0 +test:stop:21,test:trip:2-4,0,14:45:00,14:45:00,0,0,0,1,0,,,,0 +test:stop:22,test:trip:2-4,1,14:50:00,14:50:00,0,0,1,0,0,,,,0 +test:stop:71,test:trip:russian-3,0,03:00:00,03:00:00,0,0,0,1,0,,,,0 +test:stop:72,test:trip:russian-3,1,05:00:00,05:00:00,0,0,1,0,0,,,,0 +test:stop:11,test:trip:1-3,0,17:05:00,17:07:00,0,0,0,1,1,,,,0 test:stop:12,test:trip:1-3,1,17:20:00,17:23:00,0,0,0,0,1,,,,0 test:stop:13,test:trip:1-3,2,17:35:00,17:35:00,0,0,2,0,1,,,test:trip:1-3-2,0 -test:stop:14,test:trip:1-3,3,17:45:00,17:45:00,0,0,0,2,1,,,test:trip:1-3-3,0 -test:stop:11,test:trip:1-6,0,17:20:00,17:22:00,0,0,0,0,1,,,,0 +test:stop:14,test:trip:1-3,3,17:45:00,17:45:00,0,0,1,2,1,,,test:trip:1-3-3,0 +test:stop:11,test:trip:1-6,0,17:20:00,17:22:00,0,0,0,1,1,,,,0 test:stop:12,test:trip:1-6,1,17:35:00,17:38:00,0,0,0,0,1,,,,0 test:stop:13,test:trip:1-6,2,17:50:00,17:50:00,0,0,2,0,1,,,test:trip:1-6-2,0 -test:stop:14,test:trip:1-6,3,18:00:00,18:00:00,0,0,0,2,1,,,test:trip:1-6-3,0 -test:stop:21,test:trip:2-0,0,14:05:00,14:05:00,0,0,0,0,0,,,,0 -test:stop:22,test:trip:2-0,1,14:10:00,14:10:00,0,0,0,0,0,,,,0 -test:stop:71,test:trip:russian-2,0,15:00:00,15:00:00,0,0,0,0,0,,,,0 -test:stop:72,test:trip:russian-2,1,17:00:00,17:00:00,0,0,0,0,0,,,,0 -test:stop:11,test:trip:4-0,0,20:00:00,20:00:00,0,0,0,0,1,,,,0 +test:stop:14,test:trip:1-6,3,18:00:00,18:00:00,0,0,1,2,1,,,test:trip:1-6-3,0 +test:stop:21,test:trip:2-0,0,14:05:00,14:05:00,0,0,0,1,0,,,,0 +test:stop:22,test:trip:2-0,1,14:10:00,14:10:00,0,0,1,0,0,,,,0 +test:stop:71,test:trip:russian-2,0,15:00:00,15:00:00,0,0,0,1,0,,,,0 +test:stop:72,test:trip:russian-2,1,17:00:00,17:00:00,0,0,1,0,0,,,,0 +test:stop:11,test:trip:4-0,0,20:00:00,20:00:00,0,0,0,1,1,,,,0 test:stop:22,test:trip:4-0,1,20:09:00,20:09:00,0,0,0,0,1,,,,0 -test:stop:33,test:trip:4-0,2,20:17:00,20:19:00,0,0,0,0,1,,,,0 -test:stop:51,test:trip:5-0,0,23:00:00,23:00:00,0,0,0,0,0,,,,0 +test:stop:33,test:trip:4-0,2,20:17:00,20:19:00,0,0,1,0,1,,,,0 +test:stop:51,test:trip:5-0,0,23:00:00,23:00:00,0,0,0,1,0,,,,0 test:stop:52,test:trip:5-0,1,23:47:00,23:47:00,0,0,0,0,0,,,,0 -test:stop:53,test:trip:5-0,2,24:17:00,24:17:00,0,0,0,0,0,,,,0 -test:stop:11,test:trip:1-10,0,17:40:00,17:42:00,0,0,0,0,1,,,,0 +test:stop:53,test:trip:5-0,2,24:17:00,24:17:00,0,0,1,0,0,,,,0 +test:stop:11,test:trip:1-10,0,17:40:00,17:42:00,0,0,0,1,1,,,,0 test:stop:12,test:trip:1-10,1,17:55:00,17:58:00,0,0,0,0,1,,,,0 test:stop:13,test:trip:1-10,2,18:10:00,18:10:00,0,0,2,0,1,,,test:trip:1-10-2,0 -test:stop:14,test:trip:1-10,3,18:20:00,18:20:00,0,0,0,2,1,,,test:trip:1-10-3,0 -test:stop:11,test:trip:1-9,0,17:35:00,17:37:00,0,0,0,0,1,,,,0 +test:stop:14,test:trip:1-10,3,18:20:00,18:20:00,0,0,1,2,1,,,test:trip:1-10-3,0 +test:stop:11,test:trip:1-9,0,17:35:00,17:37:00,0,0,0,1,1,,,,0 test:stop:12,test:trip:1-9,1,17:50:00,17:53:00,0,0,0,0,1,,,,0 test:stop:13,test:trip:1-9,2,18:05:00,18:05:00,0,0,2,0,1,,,test:trip:1-9-2,0 -test:stop:14,test:trip:1-9,3,18:15:00,18:15:00,0,0,0,2,1,,,test:trip:1-9-3,0 -test:stop:11,test:trip:4-3,0,21:30:00,21:30:00,0,0,0,0,1,,,,0 +test:stop:14,test:trip:1-9,3,18:15:00,18:15:00,0,0,1,2,1,,,test:trip:1-9-3,0 +test:stop:11,test:trip:4-3,0,21:30:00,21:30:00,0,0,0,1,1,,,,0 test:stop:22,test:trip:4-3,1,21:39:00,21:39:00,0,0,0,0,1,,,,0 -test:stop:33,test:trip:4-3,2,21:47:00,21:49:00,0,0,0,0,1,,,,0 -test:stop:21,test:trip:2-8,0,15:25:00,15:25:00,0,0,0,0,0,,,,0 -test:stop:22,test:trip:2-8,1,15:30:00,15:30:00,0,0,0,0,0,,,,0 -test:stop:51,test:trip:5-2,0,00:40:00,00:40:00,0,0,0,0,0,,,,0 +test:stop:33,test:trip:4-3,2,21:47:00,21:49:00,0,0,1,0,1,,,,0 +test:stop:21,test:trip:2-8,0,15:25:00,15:25:00,0,0,0,1,0,,,,0 +test:stop:22,test:trip:2-8,1,15:30:00,15:30:00,0,0,1,0,0,,,,0 +test:stop:51,test:trip:5-2,0,00:40:00,00:40:00,0,0,0,1,0,,,,0 test:stop:52,test:trip:5-2,1,01:27:00,01:27:00,0,0,0,0,0,,,,0 -test:stop:53,test:trip:5-2,2,01:57:00,01:57:00,0,0,0,0,0,,,,0 -test:stop:71,test:trip:russian-0,0,15:00:00,15:00:00,0,0,0,0,0,,,,0 -test:stop:72,test:trip:russian-0,1,17:00:00,17:00:00,0,0,0,0,0,,,,0 -test:stop:11,test:trip:1-8,0,17:30:00,17:32:00,0,0,0,0,1,,,,0 +test:stop:53,test:trip:5-2,2,01:57:00,01:57:00,0,0,1,0,0,,,,0 +test:stop:71,test:trip:russian-0,0,15:00:00,15:00:00,0,0,0,1,0,,,,0 +test:stop:72,test:trip:russian-0,1,17:00:00,17:00:00,0,0,1,0,0,,,,0 +test:stop:11,test:trip:1-8,0,17:30:00,17:32:00,0,0,0,1,1,,,,0 test:stop:12,test:trip:1-8,1,17:45:00,17:48:00,0,0,0,0,1,,,,0 test:stop:13,test:trip:1-8,2,18:00:00,18:00:00,0,0,2,0,1,,,test:trip:1-8-2,0 -test:stop:14,test:trip:1-8,3,18:10:00,18:10:00,0,0,0,2,1,,,test:trip:1-8-3,0 -test:stop:21,test:trip:2-3,0,14:35:00,14:35:00,0,0,0,0,0,,,,0 -test:stop:22,test:trip:2-3,1,14:40:00,14:40:00,0,0,0,0,0,,,,0 -test:stop:11,test:trip:1-2,0,17:00:00,17:02:00,0,0,0,0,1,,,,0 +test:stop:14,test:trip:1-8,3,18:10:00,18:10:00,0,0,1,2,1,,,test:trip:1-8-3,0 +test:stop:21,test:trip:2-3,0,14:35:00,14:35:00,0,0,0,1,0,,,,0 +test:stop:22,test:trip:2-3,1,14:40:00,14:40:00,0,0,1,0,0,,,,0 +test:stop:11,test:trip:1-2,0,17:00:00,17:02:00,0,0,0,1,1,,,,0 test:stop:12,test:trip:1-2,1,17:15:00,17:18:00,0,0,0,0,1,,,,0 test:stop:13,test:trip:1-2,2,17:30:00,17:30:00,0,0,2,0,1,,,test:trip:1-2-2,0 -test:stop:14,test:trip:1-2,3,17:40:00,17:40:00,0,0,0,2,1,,,test:trip:1-2-3,0 -test:stop:21,test:trip:2-5,0,14:55:00,14:55:00,0,0,0,0,0,,,,0 -test:stop:22,test:trip:2-5,1,15:00:00,15:00:00,0,0,0,0,0,,,,0 -test:stop:11,test:trip:1-12,0,17:50:00,17:52:00,0,0,0,0,1,,,,0 +test:stop:14,test:trip:1-2,3,17:40:00,17:40:00,0,0,1,2,1,,,test:trip:1-2-3,0 +test:stop:21,test:trip:2-5,0,14:55:00,14:55:00,0,0,0,1,0,,,,0 +test:stop:22,test:trip:2-5,1,15:00:00,15:00:00,0,0,1,0,0,,,,0 +test:stop:11,test:trip:1-12,0,17:50:00,17:52:00,0,0,0,1,1,,,,0 test:stop:12,test:trip:1-12,1,18:05:00,18:08:00,0,0,0,0,1,,,,0 test:stop:13,test:trip:1-12,2,18:20:00,18:20:00,0,0,2,0,1,,,test:trip:1-12-2,0 -test:stop:14,test:trip:1-12,3,18:30:00,18:30:00,0,0,0,2,1,,,test:trip:1-12-3,0 +test:stop:14,test:trip:1-12,3,18:30:00,18:30:00,0,0,1,2,1,,,test:trip:1-12-3,0 diff --git a/tests/fixtures/gtfs2ntfs/odt_comment/output_without_frequencies/stop_times.txt b/tests/fixtures/gtfs2ntfs/odt_comment/output_without_frequencies/stop_times.txt index e8a0d3361..0900ad5e9 100644 --- a/tests/fixtures/gtfs2ntfs/odt_comment/output_without_frequencies/stop_times.txt +++ b/tests/fixtures/gtfs2ntfs/odt_comment/output_without_frequencies/stop_times.txt @@ -1,12 +1,12 @@ stop_id,trip_id,stop_sequence,arrival_time,departure_time,boarding_duration,alighting_duration,pickup_type,drop_off_type,datetime_estimated,local_zone_id,stop_headsign,stop_time_id,stop_time_precision -test:stop:51,test:trip:5,0,13:23:00,13:23:00,0,0,2,0,0,,,test:trip:5-0,0 +test:stop:51,test:trip:5,0,13:23:00,13:23:00,0,0,2,1,0,,,test:trip:5-0,0 test:stop:52,test:trip:5,1,14:10:00,14:10:00,0,0,2,0,0,,,test:trip:5-1,0 -test:stop:53,test:trip:5,2,14:40:00,14:40:00,0,0,0,2,0,,,test:trip:5-2,0 -test:stop:31,test:trip:3,0,23:50:00,23:50:00,0,0,0,0,0,,,,0 +test:stop:53,test:trip:5,2,14:40:00,14:40:00,0,0,1,2,0,,,test:trip:5-2,0 +test:stop:31,test:trip:3,0,23:50:00,23:50:00,0,0,0,1,0,,,,0 test:stop:32,test:trip:3,1,24:03:00,24:05:00,0,0,0,0,0,,,,0 -test:stop:33,test:trip:3,2,24:10:00,24:15:00,0,0,0,0,0,,,,0 -test:stop:11,test:trip:4,0,07:23:00,07:23:00,0,0,2,0,0,,,test:trip:4-0,0 +test:stop:33,test:trip:3,2,24:10:00,24:15:00,0,0,1,0,0,,,,0 +test:stop:11,test:trip:4,0,07:23:00,07:23:00,0,0,2,1,0,,,test:trip:4-0,0 test:stop:22,test:trip:4,1,07:32:00,07:32:00,0,0,2,0,0,,,test:trip:4-1,0 -test:stop:33,test:trip:4,2,07:40:00,07:42:00,0,0,2,0,0,,,test:trip:4-2,0 -test:stop:61,test:trip:6,0,14:40:00,14:40:00,0,0,2,0,0,,,test:trip:6-0,0 -test:stop:61,test:trip:6,1,15:20:00,15:20:00,0,0,2,0,0,,,test:trip:6-1,0 +test:stop:33,test:trip:4,2,07:40:00,07:42:00,0,0,1,0,0,,,test:trip:4-2,0 +test:stop:61,test:trip:6,0,14:40:00,14:40:00,0,0,2,1,0,,,test:trip:6-0,0 +test:stop:61,test:trip:6,1,15:20:00,15:20:00,0,0,1,0,0,,,test:trip:6-1,0 diff --git a/tests/fixtures/netex_france/output/reseau_TheGreatNetwork_1e97c33560621530a594ced114597ea1/offre_5cd0eea3662b0f30bd419b47ecb64840.xml b/tests/fixtures/netex_france/output/reseau_TheGreatNetwork_1e97c33560621530a594ced114597ea1/offre_5cd0eea3662b0f30bd419b47ecb64840.xml index 18af8ea73..55ad2648f 100644 --- a/tests/fixtures/netex_france/output/reseau_TheGreatNetwork_1e97c33560621530a594ced114597ea1/offre_5cd0eea3662b0f30bd419b47ecb64840.xml +++ b/tests/fixtures/netex_france/output/reseau_TheGreatNetwork_1e97c33560621530a594ced114597ea1/offre_5cd0eea3662b0f30bd419b47ecb64840.xml @@ -103,7 +103,7 @@ - true + false true @@ -122,7 +122,7 @@ true - true + false @@ -134,7 +134,7 @@ - true + false true @@ -153,7 +153,7 @@ true - true + false diff --git a/tests/fixtures/netex_france/output/reseau_TheGreatNetwork_1e97c33560621530a594ced114597ea1/offre_MagicBus_23cdf50ee73fcba0d38beca2d8cc8c0e.xml b/tests/fixtures/netex_france/output/reseau_TheGreatNetwork_1e97c33560621530a594ced114597ea1/offre_MagicBus_23cdf50ee73fcba0d38beca2d8cc8c0e.xml index 45973786c..6f2190e58 100644 --- a/tests/fixtures/netex_france/output/reseau_TheGreatNetwork_1e97c33560621530a594ced114597ea1/offre_MagicBus_23cdf50ee73fcba0d38beca2d8cc8c0e.xml +++ b/tests/fixtures/netex_france/output/reseau_TheGreatNetwork_1e97c33560621530a594ced114597ea1/offre_MagicBus_23cdf50ee73fcba0d38beca2d8cc8c0e.xml @@ -67,14 +67,14 @@ - true + false true true - true + false diff --git a/tests/fixtures/netex_france/output/reseau_TheGreatNetwork_1e97c33560621530a594ced114597ea1/offre_f31e1eef20f64733a18c538073e78396.xml b/tests/fixtures/netex_france/output/reseau_TheGreatNetwork_1e97c33560621530a594ced114597ea1/offre_f31e1eef20f64733a18c538073e78396.xml index cbaf524d5..b3f9a6bea 100644 --- a/tests/fixtures/netex_france/output/reseau_TheGreatNetwork_1e97c33560621530a594ced114597ea1/offre_f31e1eef20f64733a18c538073e78396.xml +++ b/tests/fixtures/netex_france/output/reseau_TheGreatNetwork_1e97c33560621530a594ced114597ea1/offre_f31e1eef20f64733a18c538073e78396.xml @@ -97,7 +97,7 @@ - true + false true @@ -116,7 +116,7 @@ true - true + false @@ -128,7 +128,7 @@ - true + false true @@ -147,7 +147,7 @@ true - true + false diff --git a/tests/fixtures/ntfs2ntfs/frequencies/stop_times.txt b/tests/fixtures/ntfs2ntfs/frequencies/stop_times.txt index f0f423564..267e57031 100644 --- a/tests/fixtures/ntfs2ntfs/frequencies/stop_times.txt +++ b/tests/fixtures/ntfs2ntfs/frequencies/stop_times.txt @@ -1,21 +1,21 @@ stop_id,trip_id,stop_sequence,arrival_time,departure_time,boarding_duration,alighting_duration,pickup_type,drop_off_type,datetime_estimated,local_zone_id,stop_headsign,stop_time_id,stop_time_precision -NATM,M1F1,0,00:00:00,00:00:00,0,0,0,0,0,,,,0 +NATM,M1F1,0,00:00:00,00:00:00,0,0,0,1,0,,,,0 GDLM,M1F1,1,00:10:00,00:10:00,0,0,0,0,0,,,,0 CHAM,M1F1,2,00:20:00,00:20:00,0,0,0,0,0,,,,0 -CDGM,M1F1,3,00:40:00,00:40:00,0,0,0,0,0,,,,0 -NATM,M1B1,9,00:30:00,00:30:00,0,0,0,0,0,,,,0 +CDGM,M1F1,3,00:40:00,00:40:00,0,0,1,0,0,,,,0 +NATM,M1B1,9,00:30:00,00:30:00,0,0,1,0,0,,,,0 GDLM,M1B1,8,00:20:00,00:20:00,0,0,0,0,0,,,,0 CHAM,M1B1,7,00:10:00,00:10:00,0,0,0,0,0,,,,0 -CDGM,M1B1,6,00:00:00,00:00:00,0,0,0,0,0,,,,0 -GDLB,B42F1,10,10:10:00,10:10:00,0,0,0,0,0,,,,0 -MTPB,B42F1,20,10:20:00,10:20:00,0,0,0,0,0,,,,0 -GDLB,B42B1,30,07:10:00,07:10:00,0,0,0,0,0,,,,0 -MTPB,B42B1,20,07:00:00,07:00:00,0,0,0,0,0,,,,0 -NATR,RERAF1,1,08:09:00,08:10:00,0,0,0,0,0,,,,0 +CDGM,M1B1,6,00:00:00,00:00:00,0,0,0,1,0,,,,0 +GDLB,B42F1,10,10:10:00,10:10:00,0,0,0,1,0,,,,0 +MTPB,B42F1,20,10:20:00,10:20:00,0,0,1,0,0,,,,0 +GDLB,B42B1,30,07:10:00,07:10:00,0,0,1,0,0,,,,0 +MTPB,B42B1,20,07:00:00,07:00:00,0,0,0,1,0,,,,0 +NATR,RERAF1,1,08:09:00,08:10:00,0,0,0,1,0,,,,0 GDLR,RERAF1,2,08:14:00,08:15:00,0,0,0,0,0,,,,0 CDGR,RERAF1,3,08:19:00,08:20:00,0,0,0,0,0,,,,0 -DEFR,RERAF1,5,08:24:00,08:25:00,0,0,0,0,0,,,,0 -NATR,RERAB1,21,09:49:00,09:50:00,0,0,0,0,0,,,,0 +DEFR,RERAF1,5,08:24:00,08:25:00,0,0,1,0,0,,,,0 +NATR,RERAB1,21,09:49:00,09:50:00,0,0,1,0,0,,,,0 GDLR,RERAB1,13,09:44:00,09:45:00,0,0,0,0,0,,,,0 CDGR,RERAB1,8,09:39:00,09:40:00,0,0,0,0,0,,,StopTime:RERAB1-8:0,0 -DEFR,RERAB1,5,09:24:00,09:25:00,0,0,0,0,0,,,StopTime:RERAB1-5:1,0 +DEFR,RERAB1,5,09:24:00,09:25:00,0,0,0,1,0,,,StopTime:RERAB1-5:1,0 diff --git a/tests/fixtures/ntfs2ntfs/stops/stop_times.txt b/tests/fixtures/ntfs2ntfs/stops/stop_times.txt index 7629c7136..1435b1f9a 100644 --- a/tests/fixtures/ntfs2ntfs/stops/stop_times.txt +++ b/tests/fixtures/ntfs2ntfs/stops/stop_times.txt @@ -1,24 +1,24 @@ stop_id,trip_id,stop_sequence,arrival_time,departure_time,boarding_duration,alighting_duration,pickup_type,drop_off_type,datetime_estimated,local_zone_id,stop_headsign,stop_time_id,stop_time_precision -NATM,M1F1,0,09:00:00,09:00:00,0,0,0,0,0,,,,0 +NATM,M1F1,0,09:00:00,09:00:00,0,0,0,1,0,,,,0 GDLM,M1F1,1,09:10:00,09:10:00,0,0,0,0,0,,,,0 CHAM,M1F1,2,09:20:00,09:20:00,0,0,0,0,0,,,,0 -CDGM,M1F1,3,09:40:00,09:40:00,0,0,0,0,0,,,,0 -CDGM,M1B1,6,10:40:00,10:40:00,0,0,0,0,0,,,,0 +CDGM,M1F1,3,09:40:00,09:40:00,0,0,1,0,0,,,,0 +CDGM,M1B1,6,10:40:00,10:40:00,0,0,0,1,0,,,,0 CHAM,M1B1,7,10:50:00,10:50:00,0,0,0,0,0,,,,0 GDLM,M1B1,8,11:00:00,11:00:00,0,0,0,0,0,,,,0 -NATM,M1B1,9,11:10:00,11:10:00,0,0,0,0,0,,,,0 -GDLB,B42F1,10,10:10:00,10:10:00,0,0,0,0,0,,,,0 -MTPB,B42F1,20,10:20:00,10:20:00,0,0,0,0,0,,,,0 -MTPB,B42B1,20,07:00:00,07:00:00,0,0,0,0,0,,,,0 -GDLB,B42B1,30,07:10:00,07:10:00,0,0,0,0,0,,,,0 -NATR,RERAF1,1,08:09:00,08:10:00,0,0,0,0,0,,,,0 +NATM,M1B1,9,11:10:00,11:10:00,0,0,1,0,0,,,,0 +GDLB,B42F1,10,10:10:00,10:10:00,0,0,0,1,0,,,,0 +MTPB,B42F1,20,10:20:00,10:20:00,0,0,1,0,0,,,,0 +MTPB,B42B1,20,07:00:00,07:00:00,0,0,0,1,0,,,,0 +GDLB,B42B1,30,07:10:00,07:10:00,0,0,1,0,0,,,,0 +NATR,RERAF1,1,08:09:00,08:10:00,0,0,0,1,0,,,,0 GDLR,RERAF1,2,08:14:00,08:15:00,0,0,0,0,0,,,,0 CDGR,RERAF1,3,08:19:00,08:20:00,0,0,0,0,0,,,,0 -DEFR,RERAF1,5,08:24:00,08:25:00,0,0,0,0,0,,,,0 -DEFR,RERAB1,5,09:24:00,09:25:00,0,0,0,0,1,,,,2 +DEFR,RERAF1,5,08:24:00,08:25:00,0,0,1,0,0,,,,0 +DEFR,RERAB1,5,09:24:00,09:25:00,0,0,0,1,1,,,,2 CDGR,RERAB1,8,09:39:00,09:40:00,0,0,0,0,0,,,,0 GDLR,RERAB1,13,09:44:00,09:45:00,0,0,0,0,0,,,,0 NATR,RERAB1,21,09:49:00,09:50:00,0,0,0,0,0,,,,0 MTPZ,RERAB1,50,19:24:00,19:25:00,0,0,0,0,1,,,,2 CDGZ,RERAB1,51,19:26:00,19:27:00,0,0,0,0,0,,,,0 -MTPZ,RERAB1,52,19:34:00,19:35:00,0,0,0,0,1,,,,2 +MTPZ,RERAB1,52,19:34:00,19:35:00,0,0,1,0,1,,,,2 diff --git a/tests/fixtures/restrict-validity-period/output/stop_times.txt b/tests/fixtures/restrict-validity-period/output/stop_times.txt index 4a3b46c70..1c5aebae1 100644 --- a/tests/fixtures/restrict-validity-period/output/stop_times.txt +++ b/tests/fixtures/restrict-validity-period/output/stop_times.txt @@ -1,13 +1,13 @@ stop_id,trip_id,stop_sequence,arrival_time,departure_time,boarding_duration,alighting_duration,pickup_type,drop_off_type,datetime_estimated,local_zone_id,stop_headsign,stop_time_id,stop_time_precision -CDGM,M1B1,6,10:40:00,10:40:00,0,0,0,0,0,,,stoptime:8,0 +CDGM,M1B1,6,10:40:00,10:40:00,0,0,0,1,0,,,stoptime:8,0 CHAM,M1B1,7,10:50:00,10:50:00,0,0,0,0,0,,,stoptime:7,0 GDLM,M1B1,8,11:00:00,11:00:00,0,0,0,0,0,,,stoptime:6,0 -NATM,M1B1,9,11:10:00,11:10:00,0,0,0,0,1,,headsign kept,stoptime:5,2 -GDLB,B42F1,10,10:10:00,10:10:00,0,0,0,0,0,,,stoptime:9,0 -MTPB,B42F1,20,10:20:00,10:20:00,0,0,0,0,0,,,stoptime:10,0 -MTPB,B42B1,20,07:00:00,07:00:00,0,0,0,0,0,,,stoptime:12,0 -GDLB,B42B1,30,07:10:00,07:10:00,0,0,0,0,0,,,stoptime:11,0 -GDLM,B42B1_R,0,20:34:00,20:35:00,0,0,0,0,1,,,stoptime:27,2 -GDLM,B42F1_R,0,20:34:00,20:35:00,0,0,0,0,1,,,stoptime:26,2 -GDLM,M1B1_R,0,20:34:00,20:35:00,0,0,0,0,1,,,stoptime:24,2 -GDLM,M1F1-2,0,20:34:00,20:35:00,0,0,0,0,1,,,stoptime:25,2 +NATM,M1B1,9,11:10:00,11:10:00,0,0,1,0,1,,headsign kept,stoptime:5,2 +GDLB,B42F1,10,10:10:00,10:10:00,0,0,0,1,0,,,stoptime:9,0 +MTPB,B42F1,20,10:20:00,10:20:00,0,0,1,0,0,,,stoptime:10,0 +MTPB,B42B1,20,07:00:00,07:00:00,0,0,0,1,0,,,stoptime:12,0 +GDLB,B42B1,30,07:10:00,07:10:00,0,0,1,0,0,,,stoptime:11,0 +GDLM,B42B1_R,0,20:34:00,20:35:00,0,0,1,1,1,,,stoptime:27,2 +GDLM,B42F1_R,0,20:34:00,20:35:00,0,0,1,1,1,,,stoptime:26,2 +GDLM,M1B1_R,0,20:34:00,20:35:00,0,0,1,1,1,,,stoptime:24,2 +GDLM,M1F1-2,0,20:34:00,20:35:00,0,0,1,1,1,,,stoptime:25,2