move old station names to external JSON as well
This commit is contained in:
parent
8a73a65656
commit
172c8a3d00
2 changed files with 61 additions and 63 deletions
|
@ -197,68 +197,8 @@ sub startup {
|
||||||
|
|
||||||
$self->attr(
|
$self->attr(
|
||||||
coordinates_by_station => sub {
|
coordinates_by_station => sub {
|
||||||
my %legacy_names = (
|
my $legacy_names = JSON->new->utf8->decode(
|
||||||
'Nordbögge' => 'Bönen-Nordbögge',
|
scalar read_file('share/old_station_names.json') );
|
||||||
'Hamm(Westf)' => 'Hamm(Westf)Hbf',
|
|
||||||
'Cottbus' => 'Cottbus Hbf',
|
|
||||||
'Delft Zuid' => 'Delft Campus',
|
|
||||||
'Barchel, Oerel' => 'Barchel',
|
|
||||||
'Biedenkopf-Schulzentrum' => 'Biedenkopf Campus',
|
|
||||||
'Bruchsal Tunnelstr' => 'Bruchsal Tunnelstraße',
|
|
||||||
'Einbeck Salzderhelden' => 'Einbeck-Salzderhelden',
|
|
||||||
'Eindhoven' => 'Eindhoven Centraal',
|
|
||||||
'Escherndorf-Vogelburg' => 'Escherndorf-Vogelsburg',
|
|
||||||
'Essel, Kutenholz' => 'Essel',
|
|
||||||
'Europapl./Postgalerie (Karl), Karlsruhe' =>
|
|
||||||
'Europaplatz/Postgalerie (Karls, Karlsruhe',
|
|
||||||
'Furth i Wald' => 'Furth im Wald',
|
|
||||||
'Germersheim Bahnhof' => 'Germersheim',
|
|
||||||
'Glossen (b Oschatz)' => 'Glossen(b Oschatz)',
|
|
||||||
'Gondelsheim Schloßstadion' => 'Gondelsheim Schlossstadion',
|
|
||||||
'Hagen, Stade' => 'Hagen(Kr. Stade)',
|
|
||||||
'Holzgerlingen Nord' => 'Holzgerlingen Hülben',
|
|
||||||
'Karlsruhe Albtalbf' => 'Karlsruhe Albtalbahnhof',
|
|
||||||
'Karlsruhe Durlacher Tor' =>
|
|
||||||
'Karlsruhe Durlacher Tor / KIT-Campus Süd',
|
|
||||||
'Karlsruhe Mühlburger Tor' =>
|
|
||||||
'Karlsruhe Mühlburger Tor (Kaiserallee)',
|
|
||||||
'Korbach' => 'Korbach Hbf',
|
|
||||||
'Merseburg' => 'Merseburg Hbf',
|
|
||||||
'Münster(b Dieburg)' => 'Münster(Hessen)',
|
|
||||||
'Neu Isenburg' => 'Neu-Isenburg',
|
|
||||||
'Niebüll, Sylt Shuttle' => 'Niebüll Autoverladung',
|
|
||||||
'Olen' => 'Olen(Belgien)',
|
|
||||||
'Rahden(Kr Lübbecke)' => 'Rahden',
|
|
||||||
'Riegel-Malterd.NE' => 'Riegel-Malterdingen NE',
|
|
||||||
'Siegen' => 'Siegen Hbf',
|
|
||||||
'Stendal' => 'Stendal Hbf',
|
|
||||||
'Teisnach Rohde&Schwarz' => 'Teisnach Rohde+Schwarz',
|
|
||||||
'Thalheim (b Oschatz)' => 'Thalheim(b Oschatz)',
|
|
||||||
'Timmendorferstrand' => 'Timmendorfer Strand',
|
|
||||||
'Waldkraiburg' => 'Waldkraiburg-Kraiburg',
|
|
||||||
'Weinheim(Bergstr)' => 'Weinheim(Bergstr)Hbf',
|
|
||||||
'Werningerode' => 'Weringerode Hbf',
|
|
||||||
'Westerland(Sylt), Sylt Shuttle' =>
|
|
||||||
'Westerland (Sylt) Autoverladung',
|
|
||||||
'Stryck' => 'Willingen-Stryck',
|
|
||||||
'Rudersdorf(Siegen)' => 'Wilnsdorf-Rudersdorf',
|
|
||||||
'Holzhausen-Heddinghausen' => 'Bad Holzhausen',
|
|
||||||
'Hummelberg' => 'Berghausen Hummelberg',
|
|
||||||
'Wehrden' => 'Beverungen-Wehrden',
|
|
||||||
'Bockum-Hövel' => 'Hamm-Bockum-Hövel',
|
|
||||||
'Brügge(Westf)' => 'Lüdenscheid-Brügge',
|
|
||||||
'Dieringhausen' => 'Gummersbach-Dieringhausen',
|
|
||||||
'Eisenbach-Matzenbach' => 'Matzenbach',
|
|
||||||
'Godelheim' => 'Höxter-Godelheim',
|
|
||||||
'Heessen' => 'Hamm-Heessen',
|
|
||||||
'Lüchtringen' => 'Höxter-Lüchtringen',
|
|
||||||
'Ottbergen' => 'Höxter-Ottbergen',
|
|
||||||
'Preußen' => 'Lünen-Preußen',
|
|
||||||
'Rudersdorf(Siegen)' => 'Wilnsdorf-Rudersdorf',
|
|
||||||
'St Augustin Markt' => 'Sankt Augustin Zentrum',
|
|
||||||
'Untersulzbach' => 'Sulzbachtal',
|
|
||||||
'Freiburg West' => 'Freiburg-Landwasser',
|
|
||||||
);
|
|
||||||
my %location;
|
my %location;
|
||||||
for
|
for
|
||||||
my $station ( Travel::Status::DE::IRIS::Stations::get_stations() )
|
my $station ( Travel::Status::DE::IRIS::Stations::get_stations() )
|
||||||
|
@ -268,7 +208,7 @@ sub startup {
|
||||||
= [ $station->[4], $station->[3] ];
|
= [ $station->[4], $station->[3] ];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while ( my ( $old_name, $new_name ) = each %legacy_names ) {
|
while ( my ( $old_name, $new_name ) = each %{$legacy_names} ) {
|
||||||
$location{$old_name} = $location{$new_name};
|
$location{$old_name} = $location{$new_name};
|
||||||
}
|
}
|
||||||
return \%location;
|
return \%location;
|
||||||
|
|
58
share/old_station_names.json
Executable file
58
share/old_station_names.json
Executable file
|
@ -0,0 +1,58 @@
|
||||||
|
{
|
||||||
|
"Nordbögge":"Bönen-Nordbögge",
|
||||||
|
"Hamm(Westf)":"Hamm(Westf)Hbf",
|
||||||
|
"Cottbus":"Cottbus Hbf",
|
||||||
|
"Delft Zuid":"Delft Campus",
|
||||||
|
"Barchel, Oerel":"Barchel",
|
||||||
|
"Biedenkopf-Schulzentrum":"Biedenkopf Campus",
|
||||||
|
"Bruchsal Tunnelstr":"Bruchsal Tunnelstraße",
|
||||||
|
"Einbeck Salzderhelden":"Einbeck-Salzderhelden",
|
||||||
|
"Eindhoven":"Eindhoven Centraal",
|
||||||
|
"Escherndorf-Vogelburg":"Escherndorf-Vogelsburg",
|
||||||
|
"Essel, Kutenholz":"Essel",
|
||||||
|
"Europapl./Postgalerie (Karl), Karlsruhe":"Europaplatz/Postgalerie (Karls, Karlsruhe",
|
||||||
|
"Furth i Wald":"Furth im Wald",
|
||||||
|
"Germersheim Bahnhof":"Germersheim",
|
||||||
|
"Glossen (b Oschatz)":"Glossen(b Oschatz)",
|
||||||
|
"Gondelsheim Schloßstadion":"Gondelsheim Schlossstadion",
|
||||||
|
"Hagen, Stade":"Hagen(Kr. Stade)",
|
||||||
|
"Holzgerlingen Nord":"Holzgerlingen Hülben",
|
||||||
|
"Karlsruhe Albtalbf":"Karlsruhe Albtalbahnhof",
|
||||||
|
"Karlsruhe Durlacher Tor":"Karlsruhe Durlacher Tor / KIT-Campus Süd",
|
||||||
|
"Karlsruhe Mühlburger Tor":"Karlsruhe Mühlburger Tor (Kaiserallee)",
|
||||||
|
"Korbach":"Korbach Hbf",
|
||||||
|
"Merseburg":"Merseburg Hbf",
|
||||||
|
"Münster(b Dieburg)":"Münster(Hessen)",
|
||||||
|
"Neu Isenburg":"Neu-Isenburg",
|
||||||
|
"Niebüll, Sylt Shuttle":"Niebüll Autoverladung",
|
||||||
|
"Olen":"Olen(Belgien)",
|
||||||
|
"Rahden(Kr Lübbecke)":"Rahden",
|
||||||
|
"Riegel-Malterd.NE":"Riegel-Malterdingen NE",
|
||||||
|
"Siegen":"Siegen Hbf",
|
||||||
|
"Stendal":"Stendal Hbf",
|
||||||
|
"Teisnach Rohde&Schwarz":"Teisnach Rohde+Schwarz",
|
||||||
|
"Thalheim (b Oschatz)":"Thalheim(b Oschatz)",
|
||||||
|
"Timmendorferstrand":"Timmendorfer Strand",
|
||||||
|
"Waldkraiburg":"Waldkraiburg-Kraiburg",
|
||||||
|
"Weinheim(Bergstr)":"Weinheim(Bergstr)Hbf",
|
||||||
|
"Werningerode":"Weringerode Hbf",
|
||||||
|
"Westerland(Sylt), Sylt Shuttle":"Westerland (Sylt) Autoverladung",
|
||||||
|
"Stryck":"Willingen-Stryck",
|
||||||
|
"Rudersdorf(Siegen)":"Wilnsdorf-Rudersdorf",
|
||||||
|
"Holzhausen-Heddinghausen":"Bad Holzhausen",
|
||||||
|
"Hummelberg":"Berghausen Hummelberg",
|
||||||
|
"Wehrden":"Beverungen-Wehrden",
|
||||||
|
"Bockum-Hövel":"Hamm-Bockum-Hövel",
|
||||||
|
"Brügge(Westf)":"Lüdenscheid-Brügge",
|
||||||
|
"Dieringhausen":"Gummersbach-Dieringhausen",
|
||||||
|
"Eisenbach-Matzenbach":"Matzenbach",
|
||||||
|
"Godelheim":"Höxter-Godelheim",
|
||||||
|
"Heessen":"Hamm-Heessen",
|
||||||
|
"Lüchtringen":"Höxter-Lüchtringen",
|
||||||
|
"Ottbergen":"Höxter-Ottbergen",
|
||||||
|
"Preußen":"Lünen-Preußen",
|
||||||
|
"Rudersdorf(Siegen)":"Wilnsdorf-Rudersdorf",
|
||||||
|
"St Augustin Markt":"Sankt Augustin Zentrum",
|
||||||
|
"Untersulzbach":"Sulzbachtal",
|
||||||
|
"Freiburg West":"Freiburg-Landwasser"
|
||||||
|
}
|
Loading…
Reference in a new issue