Skip to content

Commit

Permalink
[fix] Add missing stop_code for stoplocation
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudOggy committed Aug 30, 2021
1 parent aaf2b3b commit 547171d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
authors = ["Kisio Digital <[email protected]>", "Guillaume Pinot <[email protected]>"]
name = "transit_model"
version = "0.41.0"
version = "0.41.1"
license = "AGPL-3.0-only"
description = "Transit data management"
repository = "https://github.com/CanalTP/transit_model"
Expand Down
15 changes: 8 additions & 7 deletions ntfs2gtfs/tests/fixtures/input/stops.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
stop_id,stop_name,stop_lat,stop_lon,location_type,parent_station,equipment_id
stop:area:1,whatever,48.8,2.3,1,,
stop:area:2,whatever,48.8,2.3,1,,
stop:point:1,whatever,48.8,2.3,0,stop:area:1,
stop:point:2,whatever,48.8,2.3,0,stop:area:1,
stop:zone:1,whatever,48.8,2.3,2,stop:area:2,
stop:zone:2,whatever,48.8,2.3,2,stop:area:2,
stop_id,stop_name,stop_lat,stop_lon,location_type,parent_station,equipment_id,stop_code
stop:area:1,whatever,48.8,2.3,1,,,
stop:area:2,whatever,48.8,2.3,1,,,
stop:point:1,whatever,48.8,2.3,0,stop:area:1,,point1
stop:point:2,whatever,48.8,2.3,0,stop:area:1,,
stop:zone:1,whatever,48.8,2.3,2,stop:area:2,,
stop:zone:2,whatever,48.8,2.3,2,stop:area:2,,
stop:entrance:1,whatever,48.8,2.3,3,stop:area:1,,entrance1
3 changes: 2 additions & 1 deletion ntfs2gtfs/tests/fixtures/output/stops.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
stop_id,stop_code,stop_name,stop_desc,stop_lon,stop_lat,zone_id,stop_url,location_type,parent_station,stop_timezone,level_id,wheelchair_boarding,platform_code
stop:point:1,,whatever,,2.3,48.8,,,0,stop:area:1,,,0,
stop:point:1,point1,whatever,,2.3,48.8,,,0,stop:area:1,,,0,
stop:point:2,,whatever,,2.3,48.8,,,0,stop:area:1,,,0,
stop:area:1,,whatever,,2.3,48.8,,,1,,,,0,
stop:entrance:1,entrance1,whatever,,2.3,48.8,,,2,stop:area:1,,,0,
2 changes: 1 addition & 1 deletion src/gtfs/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ fn ntfs_stop_location_to_gtfs_stop(
fare_zone_id: None,
location_type: StopLocationType::from(sl.stop_type.clone()),
parent_station: sl.parent_id.clone(),
code: None,
code: sl.code.clone(),
desc: get_first_comment_name(sl, comments),
wheelchair_boarding: wheelchair,
url: None,
Expand Down

0 comments on commit 547171d

Please sign in to comment.