streetcomplete / StreetComplete

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

Quest suggestion: Ask if a street is one-way only (for smaller towns/cities) #1982

Closed naposm closed 4 years ago

naposm commented 4 years ago

General

Affected tag(s) to be modified/added: oneway Question asked: Is this road one-way only?

Checklist

Checklist for quest suggestions (see guidelines):

Ideas for implementation

The idea is to ask this question for only some roads which don't have a oneway=no tag or oneway=yes tag (the "Assumed to be No" on the iD editor). Its is aimed at surveying small towns or rural areas where OpenStreetMap is not updated or where roads are added only using aerial imagery and no OpenStreetCam/Mapillary support and where there aren't a lot of people contributing. The problem is that when people add streets from aerial imagery, they do not put the oneway tag so it would be a bit spammy... To avoid that I would only ask this question for some roads(residential, tertiary and unclassified). This would be a spammier but more targeted to small towns version of the "Is this a one-way street?" quest (where data for the quest is not available), so maybe it would be better to put it at the very end of the quest priority and maybe with a different icon. It would be targeted at tertiary, unclassified and residential road as these are the most common in the smaller towns). This quest would ask if one of these roads is one-way and add it if the answer is positive (of course the user would select the direction as with the other quests). The implementation is a bit more difficult than expected, because as far as I know oneway=-1 is discouraged, so there might be needed to reverse the whole way to add oneway=yes

Element selection:

/*
This has been generated by the overpass-turbo wizard.
The original search was:
“oneway!=* and (highway=tertiary or highway=unclassified or highway=residential)”
*/
[out:json][timeout:25];
// gather results
(
  // query part for: “oneway!=* and highway=tertiary”
  node["oneway"!~".*"]["highway"="tertiary"]({{bbox}});
  way["oneway"!~".*"]["highway"="tertiary"]({{bbox}});
  relation["oneway"!~".*"]["highway"="tertiary"]({{bbox}});
  // query part for: “oneway!=* and highway=unclassified”
  node["oneway"!~".*"]["highway"="unclassified"]({{bbox}});
  way["oneway"!~".*"]["highway"="unclassified"]({{bbox}});
  relation["oneway"!~".*"]["highway"="unclassified"]({{bbox}});
  // query part for: “oneway!=* and highway=residential”
  node["oneway"!~".*"]["highway"="residential"]({{bbox}});
  way["oneway"!~".*"]["highway"="residential"]({{bbox}});
  relation["oneway"!~".*"]["highway"="residential"]({{bbox}});
);
// print results
out body;
>;
out skel qt;

Metadata needed:

Proposed GUI: Is this street one-way only? | Yes | | No | | It changes throughout the way | | More | --> | This road alternates between different directions frequently and often| | This road alternates between different directions regularly but infrequently. | (just an example)

If yes then the common road selection question pops out to let the person decide the direction.

matkoniecz commented 4 years ago

I think that it may be extremely hard to distinguish and detect areas where such quest would be useful. Note that "smaller towns/cities" may be very well mapped with active local contributors.

westnordost commented 4 years ago

Well, it could be asked for extremely slim streets. Something like

ways with highway ~ residential|service|tertiary|unclassified and !oneway and width < 4
naposm commented 4 years ago

I'm writing another message because the previous one was not very clear and did not explain what I meant at all... So, by smaller towns/cities I mean cities which have a lot of visitors (by foot or by car), but since these visitors come from bigger cities/other countries (so they only visit the city, they do not live there), it would be useful to just let them edit one ways.

What made me think about this quest is that in a small but busy city near my main city, there are usually some StreetComplete users who add streets and more details. Since this has also a lot of connection with many motorways, often I find a lot of one-ways which are not mapped. When I remember them, I just map them myself, but since I drive I can't open notes and such things, I just try to remember them. So that's why, since a lot of people visit those city and I've seen some edits made by StreetComplete users, it would be useful to ask this question. I think that it would be useful also in some big cities, my "for smaller towns/cities" was just to mark the difference with the already existing quest which is aimed at big cities where a lot of data is available (the improveosm data for one-ways).

The problem with the width < 4 is that since these cities are mostly mapped from aerial imagery, this data is often not available.

I hope to have explained it a little better, I apoligize for any mistake 😅

westnordost commented 4 years ago

I understand, but it is not possible to show a quest only for "small towns (in Italy) that are known to have small streets".

But no problem: What I plan to do is to add a quest that asks for the number of lanes on a road. If the number of lanes is 0 or 1, another quest is shown that asks for the width of the road. If the width is <4m or so, this quest can be shown.

naposm commented 4 years ago

I know, ideed my idea was to show it for every single road (of the 3 categories) of every city of every country.

But it would cause too much spam. Your idea makes perfect sense, in that case then it's perfect. Maybe lanes and one way could be in the same quest? I mean it could ask how many lanes per direction? I know it would become not a "simple quest" like the ones wich are usually asked but may be an idea 🤔

westnordost commented 4 years ago

I mean it could ask how many lanes per direction?

Ah right, it could. But the user will also have the possibility to answer "there are no marked lanes". Many very small residential or country roads do not have any lane markings. In that case, lanes=0 or lanes=1 is tagged. It may not be immediately visible when you are in the midst of a road whether it is a oneway or not. If asked for the lanes, you can answer that immediately from anywhere on that road, while to answer if it is a oneway usually necessitates to go to one end of the road.

matkoniecz commented 4 years ago

Many very small residential or country roads do not have any lane markings. In that case, lanes=0 or lanes=1 is tagged.

Are you sure that lanes=0 is correct? AFAIK lanes if for number of lanes for motor vehicles, not count of marked lanes.

EDIT: I am not disputing that some lane=0 are tagged, I am just claiming that is not matching how lane tag is used in general.

westnordost commented 4 years ago

No, not sure, will need to look it up.

peternewman commented 4 years ago

Would it also make sense to filter out dead ends to reduce the spamming, as a road with only one connection to the rest of the network can't be one way unless another road hasn't been mapped (or unless it's a car factory! 😄).

naposm commented 4 years ago

Would it also make sense to filter out dead ends to reduce the spamming, as a road with only one connection to the rest of the network can't be one way unless another road hasn't been mapped (or unless it's a car factory! 😄).

Yes, absolutely! I hadn't thought about that.

kmpoppe commented 4 years ago

Re lanes=0:

I was like: There can't be that many ... queries overpass ... oh!

I believe that most of them fall into what's described in the Wiki: [...]To signify that a road has no lane markings, it is recommended to use an explicit tag like lane_markings=no or similar instead of an odd value for the lanes=* key like 0, 1.5 or none[...]

So my take on that would be: lane_markings=no is fine, lanes=0 should be avoided.

Re the quest overall:

I like the idea (asking with width < 4 makes sense). When creating the quest we need to consider that the direction of the way must be shown to the user, because oneway is only supposed to be tagged with yes meaning "in the direction of the way". If the user hits "Yes, this is a one-way", but the order of the nodes in the way faces opposite to the marked one-way, that would be counter-productive.

Also I've yet to find a oneway in my homezone that's either alternating (changes direction often, think "Messeschnellweg" in Hannover which is the trunk-road towards the Fairground, that would be a perfect candidate, albeit it's currently oneway=yes) or reversible ("Herbert-Weichmann-Straße" in Hamburg seems to be the closest to me that has a correct and consistent mapping on all it's points) - the latter adding an opening_hours-like complexity to the quest.

westnordost commented 4 years ago

Yes correct, so in this version of "is this a oneway", there must be a UI that enables (and explicitly demands from) the user to select into which direction this is a oneway. I think alternating and reversible are so exotic that they don't need to be supported, in such cases the user can leave a note instead.

kmpoppe commented 4 years ago

@westnordost would you be able to find the time to give those issues that you think need a pretty high work-load on your part due to additional UI design a "blocked" label (like this one and 856), because I was looking for things to get my head into implementing quests ("Fingerübung") but that's no use if you can't do anything with said work yet. Thanks!

westnordost commented 4 years ago

I wouldn't consider things that are more effort blocked. I will look at what quests may be easier to do and comment here

westnordost commented 4 years ago

@kmpoppe The following quests are easy: #1961, probably #1756, #1572 The most effort however for most new quest would be the research how tags are actually used and which answer options should reasonably be displayed, then also to find fitting pictures in case the UI should consist of pictures being selected.

westnordost commented 4 years ago

@peternewman Any idea how to filter this with overpass?

westnordost commented 4 years ago

Screenshot_1601071284

peternewman commented 4 years ago

@peternewman Any idea how to filter this with overpass?

I've no idea if it's even possible, but as no-one else has responded I'll have a hunt and see what I can find.

peternewman commented 4 years ago

Best I've managed to find so far is this: https://dev.overpass-api.de/blog/loop_and_group.html#complete

And then run this, which finds all the related nodes to a way recursively with the same name: https://overpass-turbo.eu/s/YsP

So that gets all of a road. But then we'd need to count how many nodes they have linking to other roads.

iD also has these validations, but it looks like they use a lot of client-side processing: https://github.com/openstreetmap/iD/tree/develop/modules/validations