HAFAS: filter out border stations
This commit is contained in:
parent
d75ae5eb45
commit
fd805597f5
1 changed files with 7 additions and 2 deletions
|
@ -169,8 +169,13 @@ sub get_route_timestamps_p {
|
|||
[ $coord->{lon}, $coord->{lat} ] );
|
||||
}
|
||||
}
|
||||
my $iris_stations = join( '|', $opt{train}->route );
|
||||
my $hafas_stations = join( '|', @station_list );
|
||||
my $iris_stations = join( '|', $opt{train}->route );
|
||||
|
||||
# borders (Gr" as in "Grenze") are only returned by HAFAS.
|
||||
# They are not stations.
|
||||
my $hafas_stations
|
||||
= join( '|', grep { $_ !~ m{(\(Gr\)|\)Gr)$} } @station_list );
|
||||
|
||||
if ( $iris_stations eq $hafas_stations
|
||||
or index( $hafas_stations, $iris_stations ) != -1 )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue