Commit a9cca52b authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

perltidy

parent e194d57f
Loading
Loading
Loading
Loading
+124 −116
Original line number Diff line number Diff line
@@ -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 ],
@@ -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;