summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-06-27 21:28:19 +0200
committerDaniel Friesel <derf@finalrewind.org>2021-06-27 21:28:19 +0200
commit73cd59e8ef10aa97d067ca88bd857dd31af2a062 (patch)
tree1138210067229dd7bf7848eba168daffd794ee0b /bin
parente4ba64255d0b8c6e7781d3efa7c51bedb98242d1 (diff)
update to station list as of may 2021 (from march 2020)
Diffstat (limited to 'bin')
-rwxr-xr-xbin/merge-haltestellen-and-iris10
1 files changed, 6 insertions, 4 deletions
diff --git a/bin/merge-haltestellen-and-iris b/bin/merge-haltestellen-and-iris
index 42b62bf..792ef53 100755
--- a/bin/merge-haltestellen-and-iris
+++ b/bin/merge-haltestellen-and-iris
@@ -19,12 +19,14 @@ class ProgressBar(Bar):
vrr_stops = list()
-with open("haltestellenliste.csv", "r", encoding="iso-8859-1") as f:
+with open("stop.csv", "r", encoding="iso-8859-1") as f:
f.readline()
cr = csv.reader(f, delimiter=";")
- for _, _, _, _, optid, lon, lat, stop, _, _ in cr:
- lon = lon[:5] + lon[6:]
- lat = lat[:6] + lat[7:]
+ for field in cr:
+ stop = field[3]
+ lon = field[6]
+ lat = field[7]
+ optid = field[16]
try:
vrr_stops.append((stop.strip(), float(lat), float(lon), optid.strip()))
except ValueError: