-
Notifications
You must be signed in to change notification settings - Fork 2
Cutover A/B Street to using osm2lanes #71
Comments
Sounds good,
This still needs to be implemented in osm2lanes right? The rest seems relatively clear, cutovers are always challenging... |
I just tried the web viewer... plug in https://www.openstreetmap.org/way/39365402, a building, and it rewrote into a road with 2 lanes. So there's the answer. :) If the input doesn't represent something road-like, we should probably bail out cleanly.
|
OSM and other raw input into and store, before later converting to a Map. Why? - build-time performance: while iterating on geometry problems, map_editor in release mode took 33s to build before, 11s now that the crate is split - better layering: operations on a RawMap are becoming increasingly distinct from later transformations on the bigger map model - this helps tease apart the dependencies of the intersection polygon algorithm for #846 - this will make it simpler to cutover to osm2lanes for a-b-street/osm2lanes#71 There's further reorganization in raw_map and map_model that'll follow, but the main work is done here.
FYI I started this at https://github.com/a-b-street/abstreet/tree/osm2lanes. https://github.com/a-b-street/abstreet/blob/osm2lanes/raw_map/src/lane_specs.rs has the conversion logic. So far, not bad! Some of the biggest issues jumping out at me:
I've got enough other things to juggle to help out anytime soon, sorry. :\ But I am working on extracting the logic for making road/intersection polygons into a separate crate, adding unit tests, and taking other steps to make it usable outside of A/B Street |
do you need any metadata associated with this, or is I think that is just bad tagging... fascinating example, so many random tags just thrown together... I think this is where we can start using the Infer<> values to "build" a best guess, and throw warnings whenever there is something suspicious. The error for now should also have been |
type = construction is nearly enough. I think using
100% agree... This is common though. A/B Street needs to do something for broken tagging besides crashing. My approach in the past has been to try to best-guess what the tagger meant, but I think that led to the super messy v1 of the tags_to_lanes implementation. I vote we stay strict in the new osm2lanes. In A/B Street, I can just transform broken roads into something obviously wrong, like a super skinny one-way one lane road, and display some kind of error. If these errors happen frequently in areas I personally need for other work, I'll pre-process tags on my end to "fix" them or attempt to fix upstream in OSM. So... osm2lanes should stay strict.
Same as above -- I have no idea what the mappers meant here. :D I'd honestly be happy just quasi-refusing to attempt to render this in A/B Street going forward, to encourage cleaning up the tagging. Handling the best guess in osm2lanes is an option, but
|
Do you need an is_road clone, or can you do: |
my next 2 PRs, in no particular order:
|
I can use |
so construction is now in, where do we stand? |
I will revisit after March 23, sorry :( Very high-stakes conference / deadline to finish the LTN work |
(reminder) |
I did not get less busy yet. :( But when I revive this, I'll use it as a forcing function to start some kind of locale-specific width config to roughly match areas I've spent a little time tuning before. |
Ah, width is missing. |
Ah, yeah. Biggest missing thing from my POV is width. And if we wind up with a public API sort of like https://github.com/a-b-street/abstreet/blob/191f1ca265a51563995460f5375913ed30f7895a/raw_map/src/types.rs#L472 (but with locale, highway type, and lane type as input), even better, because then A/B Street's lane editor UI will just automagically make more sense in different places. |
…n to switching to osm2lanes for a-b-street/osm2lanes#71
I think the latest version will improve things, I haven't set up a dev environment for abstreet yet to check myself though, will do that ASAP |
I'll update the draft PR with latest osm2lanes real quick. I don't think I can work on validation for a bit, though. |
osm2lanes is nearly at a point where I'd like to make A/B Street take a dependency on it and remove the original copy of the osm2lanes logic. Just writing down some notes about how to transition, not sure when I'll have time to tackle this.
The steps are probably:
The text was updated successfully, but these errors were encountered: