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

Quest: cycleway #139

Closed
DJaeger opened this issue Apr 24, 2017 · 21 comments
Closed

Quest: cycleway #139

DJaeger opened this issue Apr 24, 2017 · 21 comments
Assignees
Labels
new quest accepted new quest proposal (if marked as blocked, it may require upstream work first)
Milestone

Comments

@DJaeger
Copy link

DJaeger commented Apr 24, 2017

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
Copy link
Member

westnordost commented Apr 24, 2017 via email

@DJaeger
Copy link
Author

DJaeger commented Apr 24, 2017

You are right

@DJaeger DJaeger closed this as completed Apr 24, 2017
@westnordost
Copy link
Member

westnordost commented Apr 24, 2017

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).

@westnordost westnordost reopened this Apr 24, 2017
@westnordost westnordost added the new quest accepted new quest proposal (if marked as blocked, it may require upstream work first) label Apr 24, 2017
@westnordost
Copy link
Member

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
Copy link
Member

matkoniecz commented Apr 27, 2017

@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

  • forms area around cycle_track.linestring (with radius 1e-5)
  • finds common part of cycleway.linestring and this buffer (in other words only parts of cycleway.linestring that are within 1e-5 from cycle_track.linestring are kept)
  • computes length of what was kept (length of cycleway within 1e-5 from cycle_track)
  • checks whatever computed length is larger that 5e-5

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
Copy link
Member

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
Copy link
Member

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
Copy link
Contributor

althio commented Apr 27, 2017

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
Copy link

mmd-osm commented Apr 28, 2017

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
Copy link
Member

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
Copy link

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
Copy link
Member

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
Copy link

mmd-osm commented Apr 29, 2017

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
Copy link
Member

westnordost commented Apr 29, 2017

@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
Copy link

mmd-osm commented Apr 29, 2017

@westnordost : that's not possible as of today, but luckily we already have an open issue for it: drolbr/Overpass-API#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
Copy link
Member

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".

@westnordost westnordost self-assigned this May 1, 2017
@rugk
Copy link
Contributor

rugk commented Aug 20, 2017

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
Copy link
Member

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

westnordost added a commit that referenced this issue Sep 18, 2017
@westnordost westnordost added this to the v3 milestone Oct 11, 2017
This was referenced Oct 31, 2017
westnordost added a commit that referenced this issue Nov 4, 2017
* Implement quest cycleway #139

* explicitly tag cycleway:both (and not just cycleway) if both sides are the same

* also tag oneway:bicycle=no in oneways where there is an opposite lane/track

* more work on cycleways (+fix after merge)

* add tests

* set up for UI tests step 1

* Revert "set up for UI tests step 1"

This reverts commit 2416abc.

* implement suggestion to exclude streets tagged as "bicycles not allowed"

* fix default pictures are kept after screen rotate

* fix comment

* remove center road marking for cycleway pictures
@westnordost
Copy link
Member

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
Copy link
Member

westnordost commented Dec 26, 2017 via email

@rugk rugk mentioned this issue Jan 15, 2018
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new quest accepted new quest proposal (if marked as blocked, it may require upstream work first)
Projects
None yet
Development

No branches or pull requests

7 participants