Skip to content

Commit

Permalink
Fix tiny mistakes in the rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
dabreegster committed Dec 4, 2022
1 parent d71b573 commit 4de2a7d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions osm2streets/src/operations/collapse_intersection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,18 @@ impl StreetNetwork {
}
}

// We could be more careful merging percent_incline and other attributes, but in practice, it
// doesn't matter for the short segments we're merging.
// We could be more careful merging highway_type, layer, name, and other attributes, but in
// practice, it doesn't matter for the short segments we're merging.
let mut keep_road = self.remove_road(keep_r);
let destroy_road = self.remove_road(destroy_r);
self.intersections.remove(&i).unwrap();

// Remember the merge
keep_road.osm_ids.extend(destroy_road.osm_ids);

// There are 4 cases, easy to understand on paper. Preserve the original direction of keep_r.
// Work with points, not PolyLine::extend. We want to RDP simplify before finalizing.
// There are 4 cases, easy to understand on paper. Preserve the original direction of
// keep_r. Work with points, not PolyLine::extend. We want to RDP simplify before
// finalizing.
let mut new_pts;
let (new_src_i, new_dst_i) = if keep_road.dst_i == destroy_road.src_i {
new_pts = keep_road.reference_line.clone().into_points();
Expand Down

0 comments on commit 4de2a7d

Please sign in to comment.