From 73cd59e8ef10aa97d067ca88bd857dd31af2a062 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 27 Jun 2021 21:28:19 +0200 Subject: update to station list as of may 2021 (from march 2020) --- bin/merge-haltestellen-and-iris | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'bin') 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: -- cgit v1.2.3