osm2streets icon indicating copy to clipboard operation
osm2streets copied to clipboard

Very tiny dog-leg road breaks

Open dabreegster opened this issue 2 years ago • 2 comments

https://a-b-street.github.io/osm2streets/#20.35/51.47542/-2.53857 Screenshot from 2023-02-17 15-24-01 https://www.openstreetmap.org/node/60643708

This looks like a case where we should collapse the road, but the initial thing broke on one side?

dabreegster avatar Feb 17 '23 15:02 dabreegster

Few things go wrong here. The tiny road attached to the north end is a degenerate intersection. We initially fail to make geometry for that side due to https://github.com/a-b-street/osm2streets/blob/6b46ef12cbe7ea56885ffb72ab0e9d0fddd03524/osm2streets/src/geometry/degenerate.rs#L21.

We don't later try to collapse it as a degenerate intersection, because the road name and lane specs don't match. (Sidewalks tagged vs not.) If we force it anyway, the intersection geometry is OK, but actually it reveals lane polygons blow up when there's a sharp and small bend at the very end of the polyline: Screenshot from 2023-02-21 11-11-56

If I forcibly mark the tiny road as internal_junction and collapse it, the result is better: Screenshot from 2023-02-21 11-14-13

But how can we detect when this resolution would work? If I apply it every time the degenerate intersection geometry case finds a road too short, then some other tests degrade, like aurora sausage, where there are very tiny crosswalk ways: Screenshot from 2023-02-21 11-16-25

Maybe in the short term, only applying this rule to driveable short degenerate roads could work...

dabreegster avatar Feb 21 '23 11:02 dabreegster

If I force degenerate intersection geometry to work in more cases by reducing the required length, it doesn't break, but doesn't look good: Screenshot from 2023-02-21 11-19-58

dabreegster avatar Feb 21 '23 11:02 dabreegster