Skip to content

Commit

Permalink
Reset the center line to untrimmed before calling intersection_polygo…
Browse files Browse the repository at this point in the history
…n. Will revisit this at some point. #136, closes #143.
  • Loading branch information
dabreegster committed Dec 7, 2022
1 parent 539590f commit 844740c
Show file tree
Hide file tree
Showing 9 changed files with 1,183 additions and 1,156 deletions.
7 changes: 7 additions & 0 deletions osm2streets/src/transform/intersection_geometry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ use geom::{Circle, Distance};
use crate::{IntersectionControl, StreetNetwork};

pub fn generate(streets: &mut StreetNetwork, timer: &mut Timer) {
// TODO intersection_polygon assumes untrimmed lines as input, so reset here. Once we always
// maintain a trimmed center_line and this transformation goes away entirely, we'll have to
// revisit how this works.
for road in streets.roads.values_mut() {
road.update_center_line(streets.config.driving_side);
}

let mut remove_dangling_nodes = Vec::new();
timer.start_iter(
"find each intersection polygon",
Expand Down
Loading

0 comments on commit 844740c

Please sign in to comment.