Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import all service roads #449

Closed
dabreegster opened this issue Jan 12, 2021 · 17 comments
Closed

Import all service roads #449

dabreegster opened this issue Jan 12, 2021 · 17 comments

Comments

@dabreegster
Copy link
Collaborator

Separate cyclepaths like https://www.openstreetmap.org/way/54563641 excluded; let's try enabling them.

https://www.openstreetmap.org/way/4188078 has cycleway:left, but it winds up on the right -- I think the left-hand driving side needs some fixes here.

dabreegster added a commit that referenced this issue Jan 12, 2021
This will make it easier to visually track the progress improving the
import. Originally London was added to have one left-hand driving map
under the test, but Cambridge works for that too, and it also includes
separate cycleways.

Also fix a crash when trying to draw very very tiny arrows.
@dabreegster
Copy link
Collaborator Author

Screenshot from 2021-01-13 17-00-54
https://www.openstreetmap.org/way/586622916
foot=designated, so pedestrians should also be able to use this. Long-term plan is to explicitly model shared bike/foot paths (#139) at the simulation layer, but for the short-term, I can generate a narrow sidewalk on one side of the trail. The front path from those buildings should then snap to the sidewalk, instead of magically floating over the river.

@dabreegster
Copy link
Collaborator Author

Cambridge has a significant pedestrian plaza, tagged as highway=pedestrian, area=yes: https://www.openstreetmap.org/way/586622916#map=18/52.21279/0.12238
A/B Street doesn't import this at all yet:
Screenshot from 2021-01-13 17-05-54
So there's just negative space, and the buildings snap to the nearest sidewalk on the perimeter of this region. Importing and rendering the plaza area would be easy. Routing and snapping buildings would be extremely hard if there aren't linear ways in there. But I see https://www.openstreetmap.org/way/64528328 and similar, so something short-term (but likely buggy) could be doable.

@dabreegster
Copy link
Collaborator Author

Backing up a little, importing some of these "fancier" OSM pieces has a few criteria for success:

  • Rendering in a recognizable/reasonable way. Quite hard to do when width of linear features is unspecified or hard to guess.
  • Routing. Probably the easiest thing to get working.
  • Getting agents to use the ways without gridlocking. Pedestrians can ghost through anything (no collision detection), so simulating things like the pedestrian ways is trivial. Doing the same for vehicles (cars, bikes, buses) is much harder -- small "roads" and many "intersections" become major complications.

For each aspect of Cambridge that we're trying to model in more detail, we should be clear which of these 3 are important.

@dabreegster
Copy link
Collaborator Author

https://www.openstreetmap.org/way/3998383#map=17/52.19614/0.11652
landuse=meadow missing, easy fix

@dabreegster
Copy link
Collaborator Author

https://www.openstreetmap.org/way/4195851
Screenshot from 2021-01-13 17-21-38
Service roads without a more specific type are excluded right now, mostly because I still need to connect them properly to parking lots.

@Robinlovelace
Copy link
Contributor

Great to see this being tracked here @dabreegster. Heads-up @mvl22 we can talk about import of cycleways and other OSM features here, and hopefully implement some of your ideas from the OSM talk!

@mvl22
Copy link

mvl22 commented Jan 14, 2021

https://www.openstreetmap.org/way/586622916
foot=designated, so pedestrians should also be able to use this.

In the UK, highway=cycleway is deemed to include foot=yes, unless otherwise stated.

@mvl22
Copy link

mvl22 commented Jan 14, 2021

So there's just negative space, and the buildings snap to the nearest sidewalk on the perimeter of this region. Importing and rendering the plaza area would be easy. Routing and snapping buildings would be extremely hard if there aren't linear ways in there. But I see https://www.openstreetmap.org/way/64528328 and similar, so something short-term (but likely buggy) could be doable.

Yes, the central area does have both pedestrian area as well as highway=pedestrian. This is actually reflective of there being clearly-demarcated roadway edges within this pedestrian area anyway.

@mvl22
Copy link

mvl22 commented Jan 14, 2021

Service roads without a more specific type are excluded right now, mostly because I still need to connect them properly to parking lots.

Service roads in the UK should definitely considered be relevant to cycling, even if they are not always pleasant.

dabreegster added a commit that referenced this issue Jan 14, 2021
Since we have to regenerate everything anyway, also start importing
landuse=meadow areas for #449.
@dabreegster dabreegster changed the title Improve Trumpington import Improve Cambridge/Cheshire import Jan 18, 2021
dabreegster added a commit that referenced this issue Jan 24, 2021
changes when I downloaded it. #449

And a small parking fix to better investigate a live edit crash.
dabreegster added a commit that referenced this issue Jan 25, 2021
intersection. When the signal happened to be on a node that didn't alter
the angle of the road, it was incorrectly getting dropped before.

Not regenerating all map data just yet, but manually verified along
Newmarket Rd in Cambridge. #449
dabreegster added a commit that referenced this issue Jan 25, 2021
Fix a bug with the previous commit (lanes=1 on a two-way). Now regenerate.

... Unfortunately lakeslice now gridlocks due to a turn generation bug.
Temporarily removing the prebaked results there so I can push these last
few changes through. Will resolve this before the next release.
@Robinlovelace
Copy link
Contributor

Looking at the comments above I think big progress has been made on this issue - the import for UK cities and cycleways has been greatly improved! Any other aspects of the import to work on (thinking from an ActDev perspective)? I think this issue can be closed if these criteria have been met (there are always a few edge cases):

  • Rendering in a recognizable/reasonable way. Quite hard to do when width of linear features is unspecified or hard to guess.

  • Routing. Probably the easiest thing to get working.

  • Getting agents to use the ways without gridlocking. Pedestrians can ghost through anything (no collision detection), so simulating things like the pedestrian ways is trivial. Doing the same for vehicles (cars, bikes, buses) is much harder -- small "roads" and many "intersections" become major complications.

@dabreegster
Copy link
Collaborator Author

Any other aspects of the import to work on

Main gap left is probably importing all service roads. There are some complications with doing that I'll describe and work through.

@dabreegster dabreegster changed the title Improve Cambridge/Cheshire import Import all service roads Feb 12, 2021
@Robinlovelace
Copy link
Contributor

Aha makes sense, thanks for the update. My side, we're almost there with the build for all sites, just pushed updated data for ashton park.

@dabreegster
Copy link
Collaborator Author

dabreegster commented Feb 22, 2021

I took another pass at this, and I think I should have something working in a few hours. All service roads except for driveways will be imported. There are a few complications, but no blockers.

First, parking aisles. Many, like https://www.openstreetmap.org/way/565125051, are untagged, but A/B Street needs to understand these cross a parking lot and should be used to autogenerate individual spaces.

Second, access restrictions. Sometimes there's a gate tagged as a node, like https://www.openstreetmap.org/node/3958600551. Ideally we could cluster the group of service roads together and set an access restricted zone with no through-traffic allowed. Might not do this on the first pass; just have to watch and make sure lots of vehicles don't start trying to route through it.

Third, many service roads in OSM give a precise connection between a building or parking lot and main road. Ideally abst would make use of that, but

  1. they're not ubiquitously tagged, so there'll always be some inference happening anyway
  2. Many parking lots, and some buildings, have multiple connections to the main road, but abst just models a single driveway right now

So I think for now, still going to punt on this issue. The practical effect is that some parking lots wind up with an autogenerated driveway that snaps to the wrong road. Not a huge issue.

I'm looking at the diffs after importing more service roads, and they're generally quite helpful. For example, the uvillage shopping area in Seattle looks like this before:
Screenshot from 2021-02-21 16-00-30
All of the shops and parking lots just snap to 45th, which is quite unrealistic from a simulation perspective, especially since all turns into or out of the driveways are right turns. With more service roads imported:
Screenshot from 2021-02-21 16-02-20
The traffic light with a dedicated left turn lane to get into the shopping center now works. This looks way closer to reality!

@dabreegster
Copy link
Collaborator Author

First, parking aisles. Many, like https://www.openstreetmap.org/way/565125051, are untagged

https://wiki.openstreetmap.org/wiki/Tag:service%3Dparking_aisle#Disambiguation
My mistake, they're not mistagged at all. In any case, abst needs to treat these as if parking spots are connected perpendicularly to them.

@dabreegster
Copy link
Collaborator Author

I also noticed this monstrosity appear in SODO:
Screenshot from 2021-02-21 17-11-58
https://www.openstreetmap.org/way/758622303
lanes=30, not wrong looking at satellite. Bus bases are crazy!

dabreegster added a commit that referenced this issue Feb 22, 2021
Added an extra step to classify service roads as running through a
parking lot, to prevent them from being treated as regular roads.

Had to fix up a few prebaked traffic signals. lakeslice falls back into
gridlock; will fix separately -- too much effort behind this change to
stop.
@dabreegster
Copy link
Collaborator Author

Some fallout left to address from the previous change, but more or less, this is done. I see plenty around Cambridge. As we move towards polishing for actdev, we can hand audit a few sites that're well-known and spot anything missing.

@Robinlovelace
Copy link
Contributor

Great work importing the service roads, look forward to seeing how this changes the visualisation for our case study sites. Many thanks Dustin!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants