-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
automatically create pedestrian crossing line when joining sidewalk/road #10524
base: develop
Are you sure you want to change the base?
Conversation
entities[0].tags.footway === 'sidewalk' || | ||
entities[1].tags.footway === 'sidewalk' || | ||
entities[0].tags.cycleway === 'sidewalk' || | ||
entities[1].tags.cycleway === 'sidewalk' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* @param {[string, string][]} edges | ||
* @param {Tags} connectionTags | ||
*/ | ||
function actionConnectCrossingWays(loc, edges, connectionTags) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this function is not new, if you click hide whitespace changes, then the github UI understands that this function was simply deindented & moved 20 lines up.
@k-yle This looks great. JFYI there are things happening at facebook/Rapid#1583 and facebook/Rapid#1599 which are related to crossings but I did not look into it more, yet. |
facebook/Rapid#1583 seems pretty cool, if it were backported to iD, then we should probably auto-create the kerb nodes, otherwise every new crossing will immediately cause a validator warning |
As the creator of the original issue I just have to say thank you so much for doing this! <3 I hope it can be merged soon :D |
Closes #7385
When a sidewalk crosses a road, the validator already adds a crossing node, but it does not split the sidewalk line.
This PR makes the validator automatically split the sidewalk and create a
crossing
line.after clicking Connect using a crossing:
Most of the code is re-used from the Connect using a bridge/tunnel action. This means the length of the automatically-generated crossing also uses the existing code.