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

StreetComplete falls into a loop if there are only unusual ramp types #3115

Closed
matkoniecz opened this issue Aug 3, 2021 · 4 comments
Closed
Assignees
Labels

Comments

@matkoniecz
Copy link
Member

matkoniecz commented Aug 3, 2021

How to Reproduce
Map with general editor ramp:luggage=automatic in place where no other ramp exits.

Apply ramp quest.

https://github.com/streetcomplete/StreetComplete/blob/master/app/src/main/java/de/westnordost/streetcomplete/quests/steps_ramp/AddStepsRamp.kt#L47 - anyUnsupportedRampTagIsYes will become true so ramp=yes will be tagged

applyRampAnswer is not tagging no values https://github.com/streetcomplete/StreetComplete/blob/master/app/src/main/java/de/westnordost/streetcomplete/quests/steps_ramp/AddStepsRamp.kt#L62

as result ramp=yes will apply and element will be still eligible for quest https://github.com/streetcomplete/StreetComplete/blob/master/app/src/main/java/de/westnordost/streetcomplete/quests/steps_ramp/AddStepsRamp.kt#L19

For user it seems that quest was not applied as its icon is not disappearing.

Solutions:

(1) start tagging no in applyRampAnswer - will leave plenty of debris tags :(

(2) start tagging no in applyRampAnswer if ramp=yes will be tagged - seems to be the best one?

(3) in https://github.com/streetcomplete/StreetComplete/blob/master/app/src/main/java/de/westnordost/streetcomplete/quests/steps_ramp/AddStepsRamp.kt#L19 filter out also cases with unusual ramp values - would skip some valid targets

(4) skip entries with recent check_date:ramp and apply it if unusual ramp exists and no usual ramp applies - very ugly hack, question would reappear at least once but may make sense to not resurvey something marked as resurveyed recently

(5) skip elements with ramp:luggage=* && ramp:luggage!=no - will still break for ramp:turtles=yes (AFAIK fictional tag) or whatever else people will invent.

For examples/docs of ramp:luggage=automatic see https://www.openstreetmap.org/way/35301210/history and https://taginfo.openstreetmap.org/keys/ramp%3Aluggage#values https://wiki.openstreetmap.org/wiki/Key:ramp and https://wiki.openstreetmap.org/wiki/Key:ramp:luggage that I just created

Versions affected
latest commit as of 2021-08-03, I checked https://github.com/streetcomplete/StreetComplete/blob/master/app/src/main/java/de/westnordost/streetcomplete/quests/steps_ramp/AddStepsRampForm.kt

Posting this as I am not really happy about either solution

@matkoniecz matkoniecz added the bug label Aug 3, 2021
@matkoniecz
Copy link
Member Author

I plan to make a commit that will make following change:

start tagging no in applyRampAnswer if otherwise only ramp=yes will be tagged

As it seems to be the best one, matches what user surveyed and solves this infinite loop.

Let me know if you see a better solution.

@westnordost
Copy link
Member

Hmm, I also thinkg that (2) is the best solution.

On the other hand, note that besides bicycle, stroller and wheelchair, there is only really luggage, so maybe something specific only for luggage could be done.

The few other values, such as ramp:width etc. unfortunately share the same namespace too, urks.

@matkoniecz
Copy link
Member Author

so maybe something specific only for luggage could be done.

Add it to quests that disable quest if tagged together with ramp=yes? https://github.com/streetcomplete/StreetComplete/blob/master/app/src/main/java/de/westnordost/streetcomplete/quests/steps_ramp/AddStepsRamp.kt#L19

@westnordost
Copy link
Member

I think it is OK to ask if steps that have a luggage ramp additionally have f.e. a bicycle ramp. So I think that still (2) is the best solution.

@westnordost westnordost self-assigned this Aug 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants