Loading lib/Travel/Status/DE/IRIS/Stations.pm +124 −116 Original line number Diff line number Diff line Loading @@ -1426,7 +1426,8 @@ my @stations = ( [ 'LDRG', 'Drahtzug', 8017005, 11.124636, 51.663447 ], [ 'BDR', 'Drebkau', 8011414, 14.22313, 51.655084 ], [ 'LDAH', 'Drei Annen Hohne', 8017006, 10.726766, 51.770116 ], [ 'FBUS', 'Dreieich-Buchschlag', 8001236, 8.661204, 50.022113 ], # fixed DS100 [ 'FBUS', 'Dreieich-Buchschlag', 8001236, 8.661204, 50.022113 ] , # fixed DS100 [ 'FDCH', 'Dreieich-Dreieichenhain', 8001554, 8.708693, 49.998468 ], [ 'FGOZ', 'Dreieich-Götzenhain', 8002315, 8.731266, 49.994502 ], [ 'FOFF', 'Dreieich-Offenthal', 8004653, 8.74964, 49.981851 ], Loading Loading @@ -8502,8 +8503,15 @@ sub get_stations_by_location { # we only use geolocations inside germany. # For these, this fast preprocessing step will let through all # coordinates inside a 60km radius (and a bunch which are farther out) my @candidates = grep { $#{$_} >= 4 and abs($_->[3] - $lon) < 1 and abs($_->[4] - $lat) < 1 } @stations; my @distances = map { $geo->distance('kilometer', $lon, $lat, $_->[3], $_->[4]) } @candidates; my @candidates = grep { $#{$_} >= 4 and abs( $_->[3] - $lon ) < 1 and abs( $_->[4] - $lat ) < 1 } @stations; my @distances = map { $geo->distance( 'kilometer', $lon, $lat, $_->[3], $_->[4] ) } @candidates; my @station_map = pairwise { [ $a, $b ] } @candidates, @distances; @station_map = sort { $a->[1] <=> $b->[1] } @station_map; Loading
lib/Travel/Status/DE/IRIS/Stations.pm +124 −116 Original line number Diff line number Diff line Loading @@ -1426,7 +1426,8 @@ my @stations = ( [ 'LDRG', 'Drahtzug', 8017005, 11.124636, 51.663447 ], [ 'BDR', 'Drebkau', 8011414, 14.22313, 51.655084 ], [ 'LDAH', 'Drei Annen Hohne', 8017006, 10.726766, 51.770116 ], [ 'FBUS', 'Dreieich-Buchschlag', 8001236, 8.661204, 50.022113 ], # fixed DS100 [ 'FBUS', 'Dreieich-Buchschlag', 8001236, 8.661204, 50.022113 ] , # fixed DS100 [ 'FDCH', 'Dreieich-Dreieichenhain', 8001554, 8.708693, 49.998468 ], [ 'FGOZ', 'Dreieich-Götzenhain', 8002315, 8.731266, 49.994502 ], [ 'FOFF', 'Dreieich-Offenthal', 8004653, 8.74964, 49.981851 ], Loading Loading @@ -8502,8 +8503,15 @@ sub get_stations_by_location { # we only use geolocations inside germany. # For these, this fast preprocessing step will let through all # coordinates inside a 60km radius (and a bunch which are farther out) my @candidates = grep { $#{$_} >= 4 and abs($_->[3] - $lon) < 1 and abs($_->[4] - $lat) < 1 } @stations; my @distances = map { $geo->distance('kilometer', $lon, $lat, $_->[3], $_->[4]) } @candidates; my @candidates = grep { $#{$_} >= 4 and abs( $_->[3] - $lon ) < 1 and abs( $_->[4] - $lat ) < 1 } @stations; my @distances = map { $geo->distance( 'kilometer', $lon, $lat, $_->[3], $_->[4] ) } @candidates; my @station_map = pairwise { [ $a, $b ] } @candidates, @distances; @station_map = sort { $a->[1] <=> $b->[1] } @station_map;