a-b-street / abstreet

Transportation planning and traffic simulation software for creating cities friendlier to walking, biking, and public transit
https://a-b-street.github.io/docs/
Apache License 2.0
7.66k stars 340 forks source link

No way to add sidewalk #48

Closed zarte13 closed 4 years ago

zarte13 commented 4 years ago

I can't transform a part of the road into a sidewalk... Is there a way to make a part of the street into a sidewalk? Or if I made a sidewalk into a bike lane and want to revert back to a sidewalk after I hit finish.

dabreegster commented 4 years ago

Right now sidewalks and crosswalks can't be edited. One reason is that adding a sidewalk in reality is a pretty expensive construction project; the lane edits today could all be cheaply prototyped with paint and signs. Another reason is that removing sidewalks might disconnect bus stops and buildings. Right now pedestrians can only walk on sidewalks; if a road doesn't have any, there's not yet a way to model people walking along the shoulder.

Sometimes in OpenStreetMap, sidewalks are mapped separately from roads -- see the red footpaths at https://www.openstreetmap.org/#map=19/47.61885/-122.30161 for example. Right now I'm ignoring these and just generating sidewalks as special fixed lanes on the edges of roads. This happens at https://github.com/dabreegster/abstreet/blob/8a9ec06a4d6f5e2eb6e6da66a7b832bb24576f53/map_model/src/make/initial/lane_specs.rs#L130. Using OSM's footpaths has at least two problems: first, they're not consistently mapped everywhere in Seattle (so missing footpaths along a road could mean there's legitimately no sidewalks there, or just that they haven't been mapped yet). And second, since OSM doesn't model width of a road accurately, the placement of the sidewalks is likely to just overlap with the rest of the road in A/B Street.

Lots of this stuff seems pretty hard to me to fix. Is there any reason you wanted to edit sidewalks? Maybe there's a way to make some edits work.

zarte13 commented 4 years ago

Yeah well I could transform a sidewalk into a driving lane or bus lane or bike lane but when I applied it I could not revert to a sidewalk...

dabreegster commented 4 years ago

Wait really? That's a bug, that shouldn't be possible. Edit mode doesn't even let you select sidewalks. Can you take a video or describe exactly how you transformed a sidewalk?

zarte13 commented 4 years ago

There I recorded a video that I put in a zip file. Once you are in edit mode you can edit a sidewalk 2020-04-15 12-14-04.zip

dabreegster commented 4 years ago

You're totally right, I forgot about disabling selection in the lane editor. Fixed. Thanks for reporting! I'll reopen this issue if I have any ideas for adding new sidewalks.