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

Cycleway overlay #4657

Merged
merged 88 commits into from
Dec 5, 2022
Merged

Cycleway overlay #4657

merged 88 commits into from
Dec 5, 2022

Conversation

westnordost
Copy link
Member

@westnordost westnordost commented Nov 29, 2022

  • refactored cycleway, street parking and sidewalk parsers to be be consistent and properly handle all edge cases when tagging only one side (fixes Crash when adding a parking lane #4634). A side-effect of this is that the app will always merge same *:left and *:right values to *:both as was requested several times somewhere in this issue tracker and where I was like 🤷 before.
  • refactored cycleway quest to share as much code with the overlay as possible
  • fixed a bug in cycleway parsing: If in flow direction of a oneway there was a dual track or dual lane and in contra-flow direction there was nothing, the parser would wrongly interpret the contra-flow side as being "none, no oneway", i.e. as if bicycles could go in contraflow on the street itself
  • made cycleway parser more strict: The parser does not accept values like on_street, none etc. anymore / classifies them as INVALID rather than UNKNOWN
  • disabled cycleway quest
  • added cycleway=shoulder option for overlay and quest (see discussion)
  • sidewalk overlay: do not show missing sidewalks on roads with a speed limit <= 10 km/h and unpaved roads as missing
  • sidewalk overlay: show sidewalks mapped on cycleways, paths etc
  • sidewalk overlay: allow editing of sidewalks mapped on exclusive cycleways
  • sidewalk overlay: prefer tagging sidewalk:both=separate over sidewalk=separate

Features of the overlay

Display and change cycleway layout.

  • Cycleways behind the curb are blue-ish (a track, a shared sidewalk)
  • Lanes on the street are yellow-ish
  • Black is none
  • Red is missing, invalid or ambiguos.

Display bicycle boulevards, can be selected instead of defining cycleways left and right in countries where they exist legally, see hasBicycleBoulevard.yml

Change the cycleway situation on separately mapped ways and paths.

reverse.mp4

Display and select to reverse the direction of cycleways (functionality also added to respective quest).

This was necessary because the quest could ignore (=not show) roads tagged with such cycleways, while the overlay must support it in order to not overwrite the data with wrong data.

Yes, this very rarely actually happens, see
https://www.openstreetmap.org/way/1032480826
https://www.google.de/maps/@40.6761578,-73.9508024,3a,75y,266.58h,74.83t/data=!3m6!1e1!3m4!1snlCNLeAEszlMGEmNGcfURA!2e0!7i16384!8i8192

This required a large refactor, because the parser that reads the OSM data, the creator that puts the data model back into the tags and all of the display code needs to handle pairs of cycleway type + cycleway direction. Before, it just had to handle the cycleway type.

@westnordost
Copy link
Member Author

westnordost commented Nov 30, 2022

No, it just claims that both descriptions fit the situation. And this is correct, because the situation can be tagged both ways.

And in case there really is a kerb between sidewalk and cycleway, it is actually a more precise description.

I am kind of surprised that your main line of argumentation seems to come from the point of view that the tagging of one and the same physical situation should be adapted to how things are commonly tagged in a certain region because I do not consider this view as defensible at all in a global project with global tagging scheme.
So far, I thought we'd be on the same page on that general realization.

@matkoniecz
Copy link
Member

matkoniecz commented Nov 30, 2022

I am kind of surprised that your main line of argumentation seems to come from the point of view that the tagging of one and the same physical situation should be adapted to how things are commonly tagged in a certain region because I do not consider this view as defensible at all in a global project with global tagging scheme.
So far, I thought we'd be on the same page on that general realization.

I agree, but I treat sidewalk tagging on cycleway as local aberration not worth promoting, rather than as preferable tagging for this feature.

(maybe it is not justified in this case, but I still cannot bring myself to treat such footway as sidewalk of cycleway while footway and cycleway are together sidewalk of a road)

@westnordost
Copy link
Member Author

According to taginfo, about 25000 cycleways have a sidewalk tagged.

@matkoniecz
Copy link
Member

matkoniecz commented Nov 30, 2022

Out of 2 000 000+ cycleway segments.

https://taginfo.openstreetmap.org/tags/building=collapsed tagging for renderer is used 70 000 times.

@westnordost
Copy link
Member Author

Local "aberration" or not, software that processes OSM data needs to support this, doesn't it? StreetComplete cannot come about and just overwrite such cases with segregated=yes and thus destroy data.

@westnordost
Copy link
Member Author

Also, looking through the talk pages, sidewalks on cycleways have been brought up before, as early as 2014. It's only in Netherlands etc. where they are actually common but I believe this has nothing to do with local community preference but has to do with that there are actually a number of cycleways which have a sidewalk, i.e. a footway that is segregated from the cycleway with a kerb.

@matkoniecz
Copy link
Member

Local "aberration" or not, software that processes OSM data needs to support this, doesn't it? StreetComplete cannot come about and just overwrite such cases with segregated=yes and thus destroy data.

I agree, but would it be possible to not show this two as distinct options?

@westnordost
Copy link
Member Author

Hmm, that should be possible. You probably mean that however it is tagged, leave it as is if the user does not change the selection and if it is selected newly, always tag it with segregated.

In case you also digged through some past discussion, can you link one where the consensus was something along these lines? (I.e. "eh, no, we do not want sidewalk on cycleways generally even if there are kerbs")

@matkoniecz
Copy link
Member

matkoniecz commented Nov 30, 2022

You probably mean that however it is tagged, leave it as is if the user does not change the selection and if it is selected newly, always tag it with segregated.

yes - though there is a risk that people in Netherlands are going to be unhappy about that in turn

In case you also digged through some past discussion, can you link one where the consensus was something along these lines? (I.e. "eh, no, we do not want sidewalk on cycleways generally even if there are kerbs")

I can link as many comments to new users asking on Polish Forum/Telegram/Discord how to tag segregated cycleways and noone proposing to tag them as sidewalks. But that may be Poland-specific.

I never really discussed that topic but my first contact with that tagging style was in #3785 where I was completely confused (despite being quite involved in cycleway infrastructure tagging)

Looking at #3785 (comment) it seems to be very Dutch-specific, with segregated=yes as primary tagging style.

@matkoniecz
Copy link
Member

I can start some review thread if that would be useful.

@westnordost
Copy link
Member Author

What is a review thread?

@matkoniecz
Copy link
Member

Tread on tagging mailing list or this new community site asking people how they would tag such feature and which tagging schemes are in normal use (or accepted) in their area.

@westnordost
Copy link
Member Author

Doesn't really matter. "Cycleway with sidewalk" describes accurately a category of ... err bicycle road... in the Netherlands. Hm. This kind of touches on the the "bicycle road" topic I brought up in the forum.

@mnalis
Copy link
Member

mnalis commented Nov 30, 2022

While I can't really provide input on code itself, here is my opinion about this segregated cycleway debate:

  • if there are multiple schemas to describe some situation, both should be detected when reading the data
  • unless the user is explicitly making a change, no writing of (e.g. rewritten to other schema) should occur
  • if user is explicitly making a change, a more common schema should be written.
    Alternatively, if it very important not to do it in some country (e.g. if incompatible with Netherlands community mapping practices or something):
    • either disable that overlay (or better yet just that problematic answer) in that country only, or
    • implement code so alternative schema can be specified per-country

@westnordost
Copy link
Member Author

westnordost commented Nov 30, 2022

As I wrote before having different tagging in different countries for the same physical thing does not make sense and nothing I want to endorse in this app1. Different legal concepts and thus different ways to designate something, that's fine. But to have a situation where the same physical thing if boxed into a container and dumped into another country should then be tagged differently is untenable.

1 It would also be a bottomless pit. Imagine the number of requests in the issue tracker that would be made based on community preference of people in city X to tag Y.

@mnalis
Copy link
Member

mnalis commented Nov 30, 2022

As I wrote before having different tagging in different countries for the same physical thing does not make sense and nothing I want to endorse in this app

I agree. That's why I mentioned it only as a least preferred alternative (i.e. just to note that such possibility exists)

<string name="separate_cycleway_non_segregated">Designated combined foot- and cycleway</string>
<string name="separate_cycleway_segregated">Segregated cycle- and footway</string>
<string name="separate_cycleway_exclusive">Exclusive cycleway</string>
<string name="separate_cycleway_with_sidewalk">Exclusive cycleway with sidewalk (footway is segregated from cycleway by a kerb)</string>
Copy link
Member

@matkoniecz matkoniecz Nov 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe name it "cycleway has a sidewalk for foot traffic"?

So cases where it is clearly cycleway with sidewalk like https://community-cdn.openstreetmap.org/uploads/default/original/2X/0/0e3af26fdddf2ece75e97c6c0ca5c1e549e38273.jpeg from https://community.openstreetmap.org/t/deprecate-key-cyclestreet/6084/42 will be marked with this.

And infrastructure on edge between them, like https://wiki.openstreetmap.org/wiki/File:Witosa_bike_2.jpg will be tagged depending on local preferences (depending on is it considered as segregated footway+cycleway or cycleway with sidewalk)

And cases like https://commons.wikimedia.org/wiki/File:30111VoieVerte1248.JPG will be always tagged as segregated footway and cycleway

Or maybe name it "wide cycleway that has a sidewalk for foot traffic"?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's wrong with the current string?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claims/implies that https://wiki.openstreetmap.org/wiki/File:Witosa_bike_2.jpg is mapped incorrectly if tagged

highway=path
segregated=yes
bicycle=designated
foot=designated

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving in circles here. It does not claim it is mapped incorrectly. "Segregated cycle- and footway" is correct, too.

@westnordost
Copy link
Member Author

Another thing that I could add is to not show missing cycleways in 30 zones as missing. Unlike a road with a 30 km/h speed limit which may be roads for through traffic, 30 zones are guaranteed residential and no-through-traffic roads.

Already currently, roads with a speed limit of 20 and below are not shown as missing.

@matkoniecz
Copy link
Member

matkoniecz commented Dec 3, 2022

Another thing that I could add is to not show missing cycleways in 30 zones as missing.

Definitely makes sense.

Maybe with exception of oneway=yes ones. Maybe only for contraflow side.

@westnordost westnordost merged commit 779bfc7 into master Dec 5, 2022
@westnordost westnordost mentioned this pull request Dec 5, 2022
@westnordost westnordost deleted the cycleway-overlay branch December 27, 2022 14:30
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

Successfully merging this pull request may close these issues.

Crash when adding a parking lane
5 participants