a-b-street / a-b-street/abstreet

Embed osm2streets in map_model

未关闭
#1,041 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Rust
星标
8.2k
派生
380
PR 合并指标
30 天内没有已合并 PR

描述

Currently the `raw_map` layer embeds osm2streets `StreetNetwork`, just adding A/B Street-specific stuff in addition (buildings, areas, transit routes, and things like crosswalks & modal filters that aren't yet in osm2streets). But then the `map_model` layer, which is used by the traffic sim and all the apps, has its own representation for roads and intersections, and all the osm2streets stuff is gone. This was OK to start, but it's starting to get a bit tricky:

- A/B Street edits lane specs and needs to regenerate geometry and movements, so we have an adapter kind of hack around it now
- Rendering code is starting to be duplicated between `map_gui` and osm2streets. And then again in #1038 for Bevy
- There are some osm2streets API concepts like `RoadEdge` that'd be useful to use over here now, but they're not easy to get at

I'd like to explore options for embedding `StreetNetwork` inside `map_model::Map` too. Reasons to be wary of this:

- Keeping serialized file size small and loading times quick for large maps is important, potentially at the expense of code readability / API niceness
- the API surface of `Lane`, `Road`, `Intersection` is huge and messy
- Keeping some indirection / wrapper between osm2streets and here is a good idea for evolving the two codebases at different speeds

Another vague idea is to embed `osm2streets::{Road, Intersection}` structs inside of A/B Street equivalents, and keep a few extra fields over on this side

CC @BudgieInWA

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。