streetcomplete / StreetComplete

Easy to use OpenStreetMap editor for Android
https://streetcomplete.app
GNU General Public License v3.0
3.9k stars 356 forks source link

Quest: cycleway #139

Closed DJaeger closed 7 years ago

DJaeger commented 7 years ago

How about a quest for cycleways: http://wiki.openstreetmap.org/wiki/DE:Key:cycleway

Are you able to use the images used in the above wiki article?

westnordost commented 7 years ago

That is very difficult since cycleways may both be tagged as separate ways or as a property of a street.

As far as I know, it is not possible just by looking at tags whether any one street is missing cycleway tagging or whether the cycleway is in fact already tagged but as a separate way. (No such tag as "cycleway=separate way" exists)

So, to find out this info, one would need to analyze the geometry of all the ways in the vicinity and determine if they roughly go parallel with the street, in this case, don't display the quest. As said, this is quite complex and possibly data intensive.

On 24 April 2017 15:23:01 CEST, "Daniel Jäger" notifications@github.com wrote:

How about a quest for cycleways: http://wiki.openstreetmap.org/wiki/DE:Key:cycleway

Are you able to use the images used in the above wiki article?

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/westnordost/StreetComplete/issues/139

-- Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.

DJaeger commented 7 years ago

You are right

westnordost commented 7 years ago

Nono, only because it is very difficult, I am not saying that it is not a valid feature request. It just means that I won't be doing that in the near future because it is not exactly a low hanging fruit. If Osmose or other QA tools have the feature to find "duplicate cycleways" then maybe I can copy that logic. Currently I think none has, but it is certainly something that would make sense, so it will come sooner or later (I hope).

frodrigo commented 7 years ago

Osmose-QA already have it:

westnordost commented 7 years ago

Interesting, thank you. I don't understand it though:

ST_Length(ST_Intersection(ST_Buffer(cycle_track.linestring, 1e-5), cycleway.linestring)) > 5e-5

What does this do?

Also, making direct queries to a postgis database, .... well, I guess there is probably no public postgis OSM database around that allows direct queries from the internet.

matkoniecz commented 7 years ago

@westnordost

See http://www.postgis.org/docs/ST_Buffer.html http://www.postgis.org/docs/ST_Intersection.html http://www.postgis.org/docs/ST_Length.html

So it finds places that have cycleways tagged both as an separate way and as tag, probably tuned to avoid catching places where there is crossing of cycleways tagged using different methods.

It also happily assumes that there will be no case of two cycleways running along each other tagged using different methods.

matkoniecz commented 7 years ago

I tried making querries like that on overpass but I managed only to make half-working hack that was trying to find nodes of one way type close to nodes of other way type - what was working only for ways with high node density.

It was acceptable in my case, such false negatives would not be acceptable here as it would led to useless quests. Also, this query seemed to be resource intensive.

matkoniecz commented 7 years ago

In addition - is it really a good idea to add "cycleway=no" to highway=* almost everywhere? That would be required to somehow mark "this place is surveyed for cycleway".

I think that this app is not going to work for mapping cycleways (from my experience of mapping cycleways in a big city - it is more complicated than possible to be handled by yes/no questions).

althio commented 7 years ago

making direct queries to a postgis database, .... well, I guess there is probably no public postgis OSM database around that allows direct queries from the internet.

Maybe in the future there could be some interaction between "quests" from StreetComplete / Osmose / KeepRight / MapRoulette / others?... So that some preprocessing is shared, instead of relying 'only' on StreetComplete recipes and Overpass query...

mmd-osm commented 7 years ago

I tried making querries like that on overpass but I managed only to make half-working hack that was trying to find nodes of one way type close to nodes of other way type - what was working only for ways with high node density.

Why looking at nodes? You can use (around:xxx) also for ways. This way you should be able to see if there's a way with a certain type around another way of another type. Node density doesn't matter in that case.

Here's an example to get you started:

[bbox:{{bbox}}];
way[highway~"^(primary|secondary|tertiary|unclassified|residential)$"][highway!=cycleway][!cycleway][!"cycleway:left"][!"cycleway:right"] -> .a;
way[highway=cycleway](around.a:10) -> .b;
way.a(around.b:10) -> .c;

(.a; - .c;);
out geom;

What is missing the calculation of the common length ("checks whatever computed length is larger that 5e-5"). Not sure if this can be done. Right now, cycleways intersecting another way would also remove that way from the result list. Maybe you want to do that calculation on your own, by returning .a and .b instead.

westnordost commented 7 years ago

Wow, that's pretty cool! I didn't know this was possible. That roads are left out which have a common node with a cycleway is okay though, rather display less quests than too much (I don't know how to filter that anyway). "Missing links" between a cycleway=*-network and a highway=cycleway network can be found and fixed with various QA tools that show cycle routes.

frodrigo commented 7 years ago

For duplicated cycleway, I think it's useless de recode this, in Osmose-QA there is only 257 issues left in the world, and it's constant http://osmose.openstreetmap.fr/en/errors/graph.png?item=1180

westnordost commented 7 years ago

Hmm, I think you misunderstood what this ticket is about / what algorithm I need. What @mmd-osm posted and what I need is something else than what osmose-QA finds.

mmd-osm commented 7 years ago

Right. I came here because of a post by @westnordost on talk-ML:

The reason I asked about whether there is a tool that finds (possibly wrong) duplicate mapped cycleways because a very similar algorithm could be used to determine whether any one street is actually missing cycleway tagging or whether the cycleway is in fact already tagged but as a separate way. In other words, *I need all those roads that neither have a cycleway= tag (easy) nor have a cycleway-way next to them (the hard part). I wonder, is this possible to achieve with an Overpass query?**

westnordost commented 7 years ago

@mmd-osm Is there an unobtrusive way how to ask you whether/how another query is possible with overpass? I reckon that you get quite a lot of questions. Inspired by the cycleway-query, I have been trying to get this http://overpass-turbo.eu/s/oHn to work (for #23) for about an hour now and I just don't get it together.

mmd-osm commented 7 years ago

@westnordost : that's not possible as of today, but luckily we already have an open issue for it: https://github.com/drolbr/Overpass-API/issues/77 - check out some of the example in there, I guess example 1 would be what you're looking for.

Unfortunately, the approach I tried there has some inherit design level issues, which basically means we're back at the drawing board and don't have an immediate solution for it.

westnordost commented 7 years ago

Ah good, and I thought I was too dense to get it together :-) Well, I can always make two overpass queries and look at the data "by hand".

rugk commented 7 years ago

Sorry, but I am still not sure what this quest suggestion is about. Should it be "Has this street a cycleway?" And should the lanes and ways a cycleway can be on a street also be selected by the user?

westnordost commented 7 years ago

It is enough if I know what this quest suggestion is about.

westnordost commented 6 years ago

You raise several concerns here:

1. Why is the app tagging cycleway:both=X instead of cycleway=X?

cycleway:both=no is used in place of cycleway=no to make clear that the user explicitly checked and input that both sides have no cycleway. Similarly, the app tags cycleway:both=track if the user selected track for both sides, for the same reason.

For data consumers, cycleway=X and cycleway:both=X will probably make no difference, for OSM surveyors, it adds the mentioned information.

It is a similar thing with sidewalk=yes vs. sidewalk=both.

2. Why is cycleway=no tagged at all if there is no cycleway?

To indicate that a user surveyed the street and found no cycleway. For data consumers, this information is quite irrelevant because they will (need to) assume that no cycleway is present if none is specified. For surveyors, that is, OSM contributors, this information is valuable to know which places have been surveyed already (and thus, which places haven't). I consider this information very important because surveyor time is very valuable for the OSM project: Surveyors that pop up at one place need to be able to find out where and what still needs to be surveyed.

I program this app in a way that it will only ask for the existance of something (i.e. cycleway) if it can reasonably be assumed that there might be one.

For the next version, I plan to limit the cycleway quest to a limited set of countries where bicycle infrastructure is a common thing - i.e. I was just in Myanmar, no cycleway (and no usable sidewalk) there at all. So it doesn't make sense to ask.

Regarding

Could you explain the purpose of 'cycleway:both=no'. It appears a bit ambiguous. Both=no suggests that a cycleway could still exist in going in one direction only.

I have no idea why you think cycleway:both=no would be ambiguous. Would you elaborate?

westnordost commented 6 years ago

Uhh, did you just delete your comment or was I replying in the wrong ticket?

Am 26. Dezember 2017 06:37:35 GMT+07:00 schrieb DaveF63 notifications@github.com:

Hi Could you explain the purpose of 'cycleway:both=no'. It appears a bit ambiguous. Both=no suggests that a cycleway could still exist in going in one direction only. Is there a reason you aren't using the established tagging scheme?: https://wiki.openstreetmap.org/wiki/Key:cycleway

Note under 'cycleway=no' as a tag of "dubious usefulness". I concur with this view

-- You are receiving this because you modified the open/close state. Reply to this email directly or view it on GitHub: https://github.com/westnordost/StreetComplete/issues/139#issuecomment-353895814

-- Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.