streetcomplete / StreetComplete

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

Ask what happens where waterway and highway cross #3749

Closed arrival-spring closed 2 years ago

arrival-spring commented 2 years ago

Inspired by the recent quests about what happens when barriers and roads/paths cross.

General

Affected tag(s) to be modified/added: tunnel=culvert or bridge=yes and appropriate layer tag or ford=yes

Question asked: What happens where this road crosses this river/stream?

Checklist

Checklist for quest suggestions (see guidelines):

Ideas for implementation

Element selection: All places where road and waterway cross on the same level (waterway not mapped as an area). The ways need not share a node.

In fact maybe avoid those that share a node, because if it's meant to be a bridge or culvert then that node should be deleted, which could affect geometry (if either stream or road isn't perfectly straight either side).

If it's meant to be a ford then a node would need to be added at the intersection.

Metadata needed:

Proposed UI: What happens where this road crosses this river/stream?

Splitting would then lead to the split UI and request exactly two split points on the relevant way, after which suitable tags would be added to the relevant section.

Issues: This needs quite a lot going on behind the scenes, e.g.:

Detection of crossing ways would need to be implemented (as far as I can see the crossing barrier/highway quest looks for a shared node.

Splitting UI would need to be extended slightly to be able to request a specific number of splits.

Detecting which bit of the stream/highway is the middle, and validating that it solves the quest (i.e. there is now no highway and waterway crossing each other here). Or maybe the splitting UI could be made to request a split on each side of the crossing separately somehow.

westnordost commented 2 years ago

Detection of crossing ways would need to be implemented

The functions for checking if two ways intersect already exist, but it is very expensive to do without first sorting all the geometry into a spatial index. (That index would need to be implemented first too)

Furthermore, it seems like you missed on very important thing:

Affected tag(s) to be modified/added: tunnel=culvert or bridge=yes and appropriate layer tag or ford=yes

tunnel=culvert is set on the small segment of the stream that is a culvert. bridge=yes is set on the segment of the road that crosses over the stream. And ford=yes is set on the node that is the intersection point between the two. Issues:

  1. 2/3 options require splitting up the way first. This will be difficult to communicate to the user
  2. Depending on the answer selected, different elements need to be modified, in one option one even needs to be created + the geometries of the others adapted. This is a showstopper, StreetComplete is designed to only handle changes on 1 element.

In short, it is not possible with StreetComplete.

matkoniecz commented 2 years ago

See also https://github.com/streetcomplete/StreetComplete/discussions/2426

I considered implementing it but given enormous implementation cost and risk that it will be too complex to use - I decided that other things are better to handle

This discussion has some tentative alternatives

mcliquid commented 1 year ago

I don't know how long the feature has been around in iD, but maybe not when this ticket was created. Maybe something can be used from this implementation.

When the path is selected a bridge is added for a short part of the way: image image

When the stream is selected a culvert is added for a short part of the way (in my example 10 meters): image image

When "ford" is selected: image

Alternatively, and before I create a new issue because of just one question, would the following implementation be worth considering?

A quest is displayed for crossings of paths and streams: "How do stream and path cross here?" Four possible answers appear as choices ,each with photo for better assignment:

  1. here is a bridge
  2. here is a culvert
  3. here is a ford
  4. can't say

For the first three options an OSM note will be created saying: "Here is a bridge" for example. The fourth option asks the user to comment on the current situation. Maybe there is no stream or no path or it is something else (like a Flying Fox or whatever). The quest is hidden if there is already a comment in the vicinity.

Helium314 commented 1 year ago

It's still a lot of effort to implement (as quests currently are bound to a single element), and geometry analysis is likely to slow down quest creation considerably.

If you really want this, you can use the Osmose quest in EE to find the issues (item 1070), a custom overlay that lets you select (and then split) the ways, and the tag editor to convert a part into a bridge or culvert. What you can't do is connect both ways and add a ford.