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

Further reduce the number of cycleway quests for maxspeed=30 ways #2536

Closed
cyclingcat opened this issue Jan 29, 2021 · 12 comments
Closed

Further reduce the number of cycleway quests for maxspeed=30 ways #2536

cyclingcat opened this issue Jan 29, 2021 · 12 comments
Labels
wontfix idea rejected because it is out of scope or because required work is not matching expected benefits

Comments

@cyclingcat
Copy link

Hi there,

it's me again, still wondering why there are villages with many cyclingway quests in maxspeed=30 zones where other villages don't show them anymore. So I tried to find a pattern behind this and my current suspect is the following combination of tags:

maxspeed=30
zone:traffic=DE:urban

While this combination isn't widespread in general, there seem to be clusters where it occurs quite often. See this Overpass turbo query.

However, this tag combination is necessary but not sufficient for the superfluous cycleway quests. See for example this screenshot:

cycleway

For way 1 (= OSM way 31774388) the cycleway quest is displayed while for way 2 (= OSM way 31774385) it's not. If you compare the tags of these ways, the only difference is the "name" tag.

(BTW: Investigations like this are an additional use case for profiles! I wished I had a possibility to use a profile with no quests at all in order to deliberately activate just a single quest which would remove cluttering the display (and the screenshot) with quests irrelevant for this issue).

(See also issues #2251 and #2486.)

The cycling cat

@cyclingcat cyclingcat added the bug label Jan 29, 2021
@cyclingcat cyclingcat changed the title Further reduce the number of cycleway quests Further reduce the number of cycleway quests for maxspeed=30 ways Jan 29, 2021
@westnordost
Copy link
Member

It is not showing for Weisse Gasse because the footway branching off from Lindenstraße leading into the park is both almost parallel to the street for a few meters and close enough to the street that the algorithm decided that it might be a separately mapped sidewalk. The cycleway quest is thus not shown.


Regarding the zone:traffic:

I've looked at the code, the part of the filter that is relevant is

highway = residential and (
  maxspeed > 30
  or (maxspeed ~ ".*mph" and maxspeed !~ "([1-9]|1[0-9]|20) mph")
  or $NOT_IN_30_ZONE_OR_LESS
)

and I guess what you would like it to be is

highway = residential and not (
  maxspeed <= 30
  and (maxspeed !~ ".*mph" or maxspeed ~ "([1-9]|1[0-9]|20) mph")
  and $IN_30_ZONE_OR_LESS
)

However, the not operator is not supported in the filter syntax. So far there hasn't been the necessity for it, plus back when the statements were still translated to overpass QL, it would have increased complexity by a lot.

For just treating contradictory data more cautiously, it is also not worth to implement.

Or is it not contradictory? Is the zone:traffic tagging actually meant to tag only the difference urban/rural? Well, we can't really say at this point because zone:traffic never went past the proposal process and there is no extensive description. taginfo registers about 4% of zone:traffic to be DE:zone30, so de-facto it is contradictory.

I will close this ticket, however if someone wants to implement the not operator for the element filter syntax because maybe that feature will come in handy later as well, the code is in the de.westnordost.data.elementfilter, the core of it is the parser which is at de.westnordost.data.elementfilter.ElementFiltersParser.kt

@westnordost westnordost added wontfix idea rejected because it is out of scope or because required work is not matching expected benefits and removed bug labels Jan 29, 2021
@cyclingcat
Copy link
Author

cyclingcat commented Jan 29, 2021

Indeed, zone:traffic has been a proposal for almost 12 years now. The most elaborated description seems to be this OSM wiki page. The tag combination in my examples could be read as "This is an urban street, so the the general default speed limit of 50 km/h for those streets applies. However, there is a separate 'maxspeed' tag which overrides the speed limit part of the more generic 'zone:traffic' tag, so the real speed limit for this street is 30 km/h".

But anyway, SC seems do behave differently depending on the existence of the tag "zone:traffic". I dug a little into the code and found this snippet in https://github.com/streetcomplete/StreetComplete/blob/master/app/src/main/java/de/westnordost/streetcomplete/data/meta/OsmTaggings.kt:

val MAXSPEED_TYPE_KEYS = listOf(
    "source:maxspeed",
    "zone:maxspeed",
    "maxspeed:type",
    "zone:traffic"
)

If zone:traffic is such a questionable, rarely used and unapproved tag, why do you take this tag into account at all? Would it be an idea to simply remove this tag from the above mentioned MAXSPEED_TYPE_KEYS list (don't know about any side effects though)?

The cycling cat

@westnordost
Copy link
Member

It is not that rarely used.

@cyclingcat
Copy link
Author

At least the combination with maxspeed=30 seems to be quite uncommon. See the aforementioned Overpass turbo link: In most places there is not a single appearance of it while they occur in other places a little more often. It doesn't seem to depend on criteria like small villages vs. big cities or geographic regions, the usage of this tag combination looks quite arbitrary to me (maybe dependent on the local mapper communities, this would explain the occurrences in clusters).

At least all affected places will show the cycleway quest for many short residential streets (including dead ends) where the chance to encounter any kind of cycleways is next to zero. Some excellent examples are some regions of Lübeck or the small village of Starkenschwind (200 inhabitants, near Bamberg):

Starkenschwind

Anyway: Is there a reason for "zone:traffic" to be included into the filter expression at all? I searched the code for the identifier MAXSPEED_TYPE_KEYS and found it in the files AddCycleway.kt, AddMaxSpeed.kt and AddWayLit.kt.

The cycling cat

@cyclingcat
Copy link
Author

cyclingcat commented Jan 31, 2021

So what is the user supposed to do if he faces the situation shown above? I see three possibilities here:

  1. Answer all those cycleway quests, no matter whether it's useful or not. Definitely spammy, but at least restricted to some regions. It's also somewhat spammy in regard to superfluous tags in the OSM database, but you could argue "this is the way OSM works: every user can put any kind of tags into it as long as the information is correct". (Users knowing the local situation would be able do this even remotely.)

  2. Deactivate the cycleway quest in those regions. Perhaps many users affected by this problem will do this (as I did during the few weeks before Too many cycleway quests with the same answer! #2251 was implemented). People entering and leaving those region often will have to deactivate und reactivate this quest just as often with this strategy.

  3. Hide all those quests. A tedious task, but at least a one-time one without the need to toggle this quest type often and without the risk to forget its reactivation (see point 2.)

Some villages in my home territory also show this problem (this was the trigger for my investigations) and speaking for myself, I tend towards solution 1 to get rid of this problem permanently. But how will other users living in affected regions decide? Perhaps it would be a good idea to rethink the necessity of the zone:traffic filter, at least for the cycleway quest, and, if necessary, implement a separate list (e. g. MAXSPEED_TYPE_KEYS_FOR_CYCLEWAYS) without the zone:traffic entry just for this quest type. if this zone:traffic filter is really needed for the other two quest types.

The cycling cat

@riQQ
Copy link
Collaborator

riQQ commented Jan 31, 2021

I think the correct solution would be to tag the streets properly, if they are in a max speed 30 zone.

maxspeed=30
zone:traffic=DE:urban

is not enough to declare a max speed 30 zone.

At the moment there are the following options:

Tag Amount of value uses Tag key status Tag value documented
source:maxspeed=DE:zone30 72 507 in use
zone:maxspeed=DE:30 60 458 in use
maxspeed:type=DE:zone30 37 744 in use
zone:traffic=DE:zone30 6 199 in use

In StreetComplete, you could move the max speeds quest above the cycleway quest, to remedy this problem.

@cyclingcat
Copy link
Author

Of course there are clearer ways to tag max speed 30 zones than using zone:traffic=DE:urban and overwriting the maxspeed part of it with maxspeed=30, but the SC user should never need to know about these tagging subtleties. He only sees the many cycleway quests in some regions and has to make the decision what to do with them.

The max speed quest is disabled by default (see issue #1281).

The cycling cat

@riQQ
Copy link
Collaborator

riQQ commented Feb 2, 2021

Of course there are clearer ways to tag max speed 30 zones than using zone:traffic=DE:urban and overwriting the maxspeed part of it with maxspeed=30

maxspeed=30 and zone:traffic=DE:urban on its own is not a way to tag a max speed 30 zone. This is just incorrect or incomplete data. It just means speed limit 30 and that the way belongs to a Geschlossene Ortschaft.

In this case, how would StreetComplete know, whether the data is correct or not?

@cyclingcat
Copy link
Author

Hi,

so you think that a maxspeed of 30 shouldn't be sufficient to prevent this quest from being asked for a residential street, only do this for maxspeed 30 zones? I'm not sure which approach would be the superior one, but regardless of this: The mentioned tagging is reality in surprisingly many regions as shown in the examples above (screenshot and Overpass turbo query). In my opinion these regions are too many to ignore, and no matter if this is considered as valid tagging or not, the user cannot change it with SC, and in these regions you get flooded with this kind of quests. Here is an even more extreme example (it's Botnang, a district of Stuttgart; note the white circles which also represent cycleway quests as I deactivated all other quests before I made this screenshot):

Botnang

So the main question remains: What do you want the user to do in those regions with dozens of cycleway quests in residential areas as shown in the screenshot above? (I mentioned three possibilities here, all of them unsatisfactory IMHO.)

The cycling cat

@westnordost
Copy link
Member

Well, either ignore them or just answer them truthfully.

@smichel17
Copy link
Member

What do you want the user to do in those regions with dozens of cycleway quests in residential areas as shown in the screenshot above?

To be fair, while "dozens" is a lot, it is also… not a lot… (right is zoomed out from left)

@cyclingcat
Copy link
Author

😄😄😄

Yes, I have seen similar pictures on my screen during a short period last year when I activated the building quests (which I'm normally not very interested in; I did this only because in the villages I regularly cycle through no other quests were left at that time. Fortunately the resurvey quests came some weeks afterwards.)

However, the situation described in this issue is somewhat different because the cycleway quests mentioned here are shown in regions where almost certainly no cycleways exist (residential streets with max speed of 30 km/h, often short, sometimes dead ends).

The cycling cat

riQQ added a commit to riQQ/StreetComplete that referenced this issue Aug 22, 2023
Filter out more ways that couldn't be handled previously because the not operator was not supported yet.
See streetcomplete#2536 (comment) for some discussion.
riQQ added a commit to riQQ/StreetComplete that referenced this issue Aug 30, 2023
Filter out more ways that couldn't be handled previously because the not operator was not supported yet.
See streetcomplete#2536 (comment) for some discussion.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix idea rejected because it is out of scope or because required work is not matching expected benefits
Projects
None yet
Development

No branches or pull requests

4 participants