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

Cycleways can reverse direction when applying same selection to different ways #4722

Closed
frankie2784 opened this issue Jan 4, 2023 · 18 comments
Assignees

Comments

@frankie2784
Copy link

frankie2784 commented Jan 4, 2023

Add cycleways to a way such as the below:

Screenshot_20230104-155535.png

Then click a different way with a different orientation and SC offers the below suggested option:

Screenshot_20230104-155712.png

Applying this option adds a lane to the left side of the road travelling in the opposite direction to traffic flow (in Australia):

Screenshot_20230104-155525.png

In fact, it tags the way with cycleway:left:oneway=-1

This is counterintuitive, and I notice this seems to only occur with the auto-complete.

Without carefully looking at the direction of the arrows could mean roads are being tagged with strangely aligned cycleways.

@frankie2784 frankie2784 added the bug label Jan 4, 2023
@westnordost
Copy link
Member

I don't understand, what exactly is the issue?

@westnordost westnordost added feedback required more info is needed, issue will be likely closed if it is not provided and removed bug labels Jan 4, 2023
@matkoniecz
Copy link
Member

is it about lane being on left when filling it and then on the right when applying remembered selection?

@frankie2784
Copy link
Author

frankie2784 commented Jan 4, 2023

Given the rarity of contra-flow lanes on regular roads, I propose that SC check the direction of suggested lanes so that they travel with traffic by default (left is always up, right is always down in Australia - opposite for Europe). i.e. SC should not auto-complete lanes in the contra-flow direction (unless previously requested by the user).

SC already provides a warning when trying to manually change the direction of the lanes (but it doesn't appear when auto-complete sometimes puts in a contra-flow lane):

Screenshot_20230105-054402.png

In fact, you can see this warning pops up even when trying to change the lane to travel in the correct direction (the arrows in this case should be pointing up for standard left-side travel), which is also unnecessary.

@frankie2784
Copy link
Author

frankie2784 commented Jan 4, 2023

is it about lane being on left when filling it and then on the right when applying remembered selection?

No, it is that SC assumes the new lane is in the contra-flow direction (arrows on the left-side are down instead of up), when the previous one wasn't.

@frankie2784
Copy link
Author

Here's another example:

Screenshot_20230105-081051.png

SC suggests the "left" side as "up" in the above (correct). But when applied, actually puts the lane as "down" when viewed from the same orientation:

Screenshot_20230105-081101.png

If I instead enter the cycleways manually, it now puts the lane arrow in the correct direction:

Screenshot_20230105-081111.png

I don't have an issue with the side of the road per se (there are obvious difficulties with showing which side is "left" and "right" with a more-or-less horizontally-aligned way). The main point is that if the lane is going to be applied to the north-side of the road, like the above, then it should assume that it is travelling east rather than west (again, this is for left-hand countries like Australia, Europe will be the opposite).

@westnordost
Copy link
Member

I'd like to keep that button as dumb as possible. It fills in what it displays.

Any smartness that tries to guess the user's intention or guess how the road is supposed to look like with certain parameters is bound to be wrong some times and only contributes to its behavior regarded as inconsistent.

So, do you have any suggestion on how to improve the behavior but stay consistent?

@westnordost
Copy link
Member

In fact, you can see this warning pops up even when trying to change the lane to travel in the correct direction

Well, that's a bug

@frankie2784
Copy link
Author

I'd like to keep that button as dumb as possible. It fills in what it displays.

Any smartness that tries to guess the user's intention or guess how the road is supposed to look like with certain parameters is bound to be wrong some times and only contributes to its behavior regarded as inconsistent.

So, do you have any suggestion on how to improve the behavior but stay consistent?

I would propose for simplicity that auto-complete should always assume that, for Australia, "left" is "up" and "right" is "down". That is, the bike lane should always follow the standard direction of traffic on each side of the road - it already does this when manually selecting lanes. The user can then choose to reverse any particular lane for rare exceptions to that rule.

@frankie2784
Copy link
Author

I'd like to keep that button as dumb as possible. It fills in what it displays.

In the case of the last example, it actually fills in the reverse direction of what it displays.

Clicking on this:

Screenshot_20230105-081051~2.png

Adds this:

Screenshot_20230105-081101~3.png

@westnordost
Copy link
Member

So you say that the button should ignore any previously selected reverse direction and instead always display+apply the default direction?

If yes, why?

@frankie2784
Copy link
Author

So you say that the button should ignore any previously selected reverse direction and instead always display+apply the default direction?

If yes, why?

If it can also remember the previously chosen directionality then I guess that's fine too. However, reverse direction is exceedingly rare in real life, so it probably isn't a big deal to apply defaults every time. On top of that, applying defaults every time would safeguard against an accidental flip that goes unnoticed for multiple subsequent quests.

@westnordost
Copy link
Member

If it can also remember the previously chosen directionality then I guess that's fine too.

What do you mean? Does it currently not remember that?

@frankie2784
Copy link
Author

frankie2784 commented Jan 5, 2023

If it can also remember the previously chosen directionality then I guess that's fine too.

What do you mean? Does it currently not remember that?

No it doesn't. That's the main issue I've been trying to get across (although it seems a couple of other related issues have emerged in this thread also).

See my first example. I tagged a cycleway manually, which added it in the regular direction of traffic flow (correct).

Screenshot_20230104-155535~2.png

Then when I applied the "remembered" selection to the next way, for some reason it decided it was a contra-flow lane (incorrect).

Screenshot_20230104-155525~2.png

The arrows in the second image should be pointing up to be in the direction of traffic flow.

@westnordost westnordost self-assigned this Jan 6, 2023
@westnordost westnordost removed the feedback required more info is needed, issue will be likely closed if it is not provided label Jan 6, 2023
@westnordost
Copy link
Member

Oh, now I get it. This is actually quite the nasty bug. Will fix it asap.

@westnordost
Copy link
Member

This is actually pretty tricky to fix... the solution is a little bit dirty but at least does not result in a refactor that (just) makes everything more complicated.

the direction of the cycleway for the last answer button is now always rotated to what would be the default direction for any country.

@frankie2784
Copy link
Author

Thanks for attending to this so quickly @westnordost. That's great.

There appears to be another tiny issue lurking here. I won't open another bug report, as this seems to be related?

Due to the previous issue, this way has been tagged as having two contra-flow lanes (instead of both flowing with traffic):
image

This shows correctly in SC:
Screenshot_20230109-094841

When I reverse these in SC:
Screenshot_20230109-095001

It does flip their direction in OSM, but it leaves these unnecessary "oneway" tags (it is a two-way street, so these tags represent just the regular flow on this road):
image

Not the biggest concern, but thought it was worth flagging this slightly untidy behaviour.

@westnordost
Copy link
Member

westnordost commented Jan 9, 2023

StreetComplete deliberately does not remove explicitly set direction tags but just updates them if they are there. The consideration is that if the mapper previously cared enough to explicitly set the direction, he will have had a good reason to do this. In any case, the app should not remove any tags as long as they are not wrong. People get upset if an app automatically deletes (explicit) data, rightly so.

Now, of course, in this case it was StreetComplete which set the previous tags explicitly. But StreetComplete doesn't know who or why the tags have been set explicitly previously. And StreetComplete had a good reason to set them explicitly before: Both sides were specified by the user to go each into the opposite direction of what would be considered the default.

@frankie2784
Copy link
Author

frankie2784 commented Jan 9, 2023 via email

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