a-b-street / a-b-street/osm2streets
Propagating changes
- Ngôn ngữ chính
- Jupyter Notebook
- Star
- 155
- Fork
- 14
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
There are a few cases today where it's the caller's responsibility to restore invariants after one operation:
1) After `remove_road`, it's possible an intersection will be left orphaned, with no roads pointing to it. Those must be removed. https://github.com/a-b-street/osm2streets/blob/a9021348abded03cbedbdb77b382aafd52e6a37f/osm2streets/src/transform/collapse_intersections.rs#L123 is one place I just added to manually fix this.
2) `update_movements` has to be called when anything connected to an intersection changes
3) `update_center_line` needs to happen when `reference_line` changes
4) `collapse_short_road` may produce a loop-road that should get removed later. https://github.com/a-b-street/osm2streets/blob/a9021348abded03cbedbdb77b382aafd52e6a37f/osm2streets/src/operations/collapse_short_road.rs#L119
I'm working on a 5th, regenerating intersection geometry + trims.
Relatedly, I forgot where, but there's some branch where I can improve final geometry, but only by rerunning some transformations after generating intersection geometry. That process calculates trims, discovers roads too short to exist, and then we [collapse short roads again](https://github.com/a-b-street/osm2streets/blob/a9021348abded03cbedbdb77b382aafd52e6a37f/osm2streets/src/transform/mod.rs#L43). There's a case where if we `CollapseDegenerateIntersections` after that, we make even more progress somewhere.
An idea that's arisen somewhere before is to do more granular change tracking. Low-level operations like `remove_road` and `collapse_intersection` can precisely say which roads and intersections they touch. We could make a helper track those changes, and re-run transformations and operations on modified things. How exactly should that work? Should every transformation right now be re-expressed to operate on just a piece of the network, and we have some rules about retrying all transforms when something changes? Just starting this issue to brainstorm
Hướng dẫn đóng góp
Hướng nghiên cứu
The issue discusses change propagation in the street network transformation pipeline. Key files mentioned are collapse_intersections.rs and collapse_short_road.rs in osm2streets/src/transform/ and operations/. Start by understanding the current network data structures and how operations like remove_road and collapse_intersection modify them. The goal is to design a system that tracks changes and re-runs necessary transformations automatically. 'Done' means a design proposal or implementation that handles the listed invariants.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- rust
- Lĩnh vực
- backend, tooling
- Loại issue
- Tái cấu trúc
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 25/100