diff options
-rwxr-xr-x | share/enhance | 12 | ||||
-rw-r--r-- | share/stations.json | 9 |
2 files changed, 6 insertions, 15 deletions
diff --git a/share/enhance b/share/enhance index 25533c6..545ac65 100755 --- a/share/enhance +++ b/share/enhance @@ -20,16 +20,16 @@ for my $station ( @{$stations} ) { my $hafas = Travel::Status::DE::HAFAS->new( locationSearch => $station->{name}, ); - if (not scalar $hafas->results) { + if ( not scalar $hafas->results ) { say ' not found'; next; } - my $result = ($hafas->results)[0]; - if ($result->name ne $station->{name}) { - say ' name mismatch: got ' . $result->name; - next; + for my $result ( $hafas->results ) { + if ( $result->name eq $station->{name} ) { + $station->{latlong} = [ $result->lat, $result->lon ]; + last; + } } - $station->{latlong} = [ $result->lat, $result->lon ]; } } diff --git a/share/stations.json b/share/stations.json index 2acb343..b54e086 100644 --- a/share/stations.json +++ b/share/stations.json @@ -63000,15 +63000,6 @@ "name" : "Pfäffingen" }, { - "ds100" : "PQKPC", - "eva" : 378621, - "latlong" : [ - 49.004594, - 8.411851 - ], - "name" : "Philipp-Reis-Straße, Karlsruhe" - }, - { "ds100" : "PQKPS", "eva" : 721660, "latlong" : [ |