Skip to content

Commit

Permalink
stop len move to correct order
Browse files Browse the repository at this point in the history
  • Loading branch information
kylerchin committed Dec 2, 2024
1 parent b8f7e98 commit 6a029f9
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/birch/nearby_departures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,16 +275,6 @@ pub async fn nearby_from_coords(

let mut bus_distance_limit = 3500;

if stops.len() > 400 {
bus_distance_limit = 1500;
rail_and_other_distance_limit = 2000;
}

if stops.len() > 800 {
bus_distance_limit = 1500;
rail_and_other_distance_limit = 1500;
}

let spatial_resolution_in_degs = make_degree_length_as_distance_from_point(&input_point, rail_and_other_distance_limit as f64);

let start_stops_query = Instant::now();
Expand All @@ -301,6 +291,16 @@ pub async fn nearby_from_coords(
let end_stops_duration = start_stops_query.elapsed();

let stops = stops.unwrap();

if stops.len() > 400 {
bus_distance_limit = 1500;
rail_and_other_distance_limit = 2000;
}

if stops.len() > 800 {
bus_distance_limit = 1500;
rail_and_other_distance_limit = 1500;
}

let stops_table = stops
.iter()
Expand Down

0 comments on commit 6a029f9

Please sign in to comment.