Skip to content

Commit

Permalink
Merge roads that're so short they vanish when calculating geometry no…
Browse files Browse the repository at this point in the history
…rmally. #136

Immense improvement to many tests
  • Loading branch information
dabreegster committed Dec 16, 2022
1 parent d3fc36c commit d3d74b3
Show file tree
Hide file tree
Showing 26 changed files with 3,956 additions and 9,542 deletions.
5 changes: 3 additions & 2 deletions osm2streets/src/transform/intersection_geometry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@ pub fn generate(streets: &mut StreetNetwork, timer: &mut Timer) {
{
road.center_line = pl;
} else {
// TODO Mark for collapsing?
error!("{} got trimmed into oblivion", road.id);
error!("{} got trimmed into oblivion, collapse it later", road.id);
road.center_line = untrimmed;
// Collapse it later
road.internal_junction_road = true;
}
}

Expand Down
3 changes: 3 additions & 0 deletions osm2streets/src/transform/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ impl Transformation {
Transformation::CollapseDegenerateIntersections,
Transformation::ShrinkOverlappingRoads,
Transformation::GenerateIntersectionGeometry,
// The above may discover more roads to collapse
Transformation::CollapseShortRoads,
Transformation::GenerateIntersectionGeometry,
]
}

Expand Down
Loading

0 comments on commit d3d74b3

Please sign in to comment.