Modify

Opened 9 years ago

Last modified 12 months ago

#9304 new enhancement

in validator, check for intersecting roads in different layers

Reported by: aceman Owned by: team
Priority: normal Milestone:
Component: Core validator Version: latest
Keywords: layer connected Cc:

Description

I propose to add new test into the validator that would emit a warning for this situation:

  • Intersecting roads (sharing a node) if their layer= value is different.
  • Road ending on another road (sharing a node but terminating there) if their layer= value is different AND if their highway= value is different. This should filter out legitimate cases of bridges (part of the same road is without layer, the part on the bridge is layer>0 and they must meet somewhere).

Maybe the check can be done on other type of objects but I am not sure if that is safe. But in case of roads incorrect intersection nodes cause wrong routing on nodes where it is not possible in reality.

Attachments (0)

Change History (14)

comment:1 Changed 9 years ago by mkoniecz

It should work also for footways, paths, cycleways, bridleways, railways and waterways.

Maybe for power lines - if tagging scheme used there is sane.

comment:2 Changed 9 years ago by aceman

I'd say power lines could be a different beast, they may share a power tower in the same level (because there are several cables), can share a way and then separate starting at some power tower. They could be mapped using overlapping and crossing ways. And if we wanted to still use layer on them, it may be hard to choose a proper values as power lines do not really change properties in their run, so can be mapped using a country long way. Having a single layer>=1 for the whole run may be insufficient for them.

OK, back to the topic. The second restriction may not be correct. A bridge (layer=1) may be connected to several roads at one side (think motorway + motorway_link) so the check as described does not work (even though the wiki discourages such a junction, but the example is not really a junction). So maybe the check should be reduced to test T- and +-shaped junctions where a road connects in the middle of another one with a different layer.

comment:3 Changed 9 years ago by mkoniecz

"even though the wiki discourages such a junction" - and there is a good reason for this, so detecting things like this is not a bad idea. There is small risk that situation where this is a proper mapping are more popular than some may expect. But separate test may be a better idea here (node with more that free ways carrying the same type of traffic*, bridge/tunnel status is not the same?).

*road/footway/cycleway/railway/waterway

comment:4 in reply to:  3 Changed 9 years ago by aceman

Replying to Bulwersator:

"even though the wiki discourages such a junction" - and there is a good reason for this, so detecting things like this is not a bad idea. There is small risk that situation where this is a proper mapping are more popular than some may expect.

Yes I have no problem if you warn of this usage too. I leave the decision to more knowledgeable mappers/developers.

But separate test may be a better idea here (node with more that free ways carrying the same type of traffic*, bridge/tunnel status is not the same?).

I am not sure what you ask about bridge and tunnel...

comment:5 Changed 6 years ago by RicoZ

there are two slightly different situations:

Different layers but one of them is implicit layer=0. I think there is little that can be done in this case as an implicit layer is a bit like a joker and I would expect many false positives. Maybe later but would certainly exclude this case in the beginning.

Two explicitly different layers - there may be some useful tests that can be done here:

  • any way with an explicit layer should have a bridge/tunnel or one of the other tags mentioned in key:layer. I frequently search for "stale layer" tags with "(highway | railway=rail |waterway) -layer=0 layer=* -tunnel=* -bridge=* -culvert=yes -*=steps -*=elevator -covered=yes -indoor=yes" and it finds me plenty of mapping errors like missing bridges etc with not too many false positives
  • when two bridges cross with a shared node other than a pylon/lift it can be considered an unintended mistake with high probability, the confidence decreases with longer bridges so maybe there should be a cutoff like 3 or 4 nodes maximum bridge length for this check in the beginning

comment:6 in reply to:  5 Changed 6 years ago by ssprunk

Replying to RicoZ:

  • when two bridges cross with a shared node other than a pylon/lift it can be considered an unintended mistake with high probability, the confidence decreases with longer bridges so maybe there should be a cutoff like 3 or 4 nodes maximum bridge length for this check in the beginning

I've never seen a case where this was a mistake, and it's fairly common to have T (two ways) or Y (three ways) junctions of bridges, the latter particularly with freeway ramps. I'll grant that + (two, three or four ways) junctions are rare, in part because they are so difficult to construct, but enough of them exist that false positives would seem to outweigh true positives.

A Y or | junction with bridge and non-bridge is probably correct, but a T junction probably isn't--and I know Mapnik doesn't render them well even when correct. I'm not sure layer actually matters, aside from bridges implying layers.

comment:7 Changed 16 months ago by skyper

If I got it right, a warning about every junction of linear high/rail/waterway with different layer=* on the two (T- or X-junction) or more ways sharing the node should raise a warning, right.

Another question are the stale layer tags which is partially implemented (waterway) and discussed in several other tickets like #9819.

comment:8 Changed 16 months ago by skyper

See also #18202.

comment:9 Changed 16 months ago by skyper

Keywords: layer connected added

comment:10 in reply to:  7 Changed 12 months ago by reichg

Replying to skyper:

If I got it right, a warning about every junction of linear high/rail/waterway with different layer=* on the two (T- or X-junction) or more ways sharing the node should raise a warning, right.

Another question are the stale layer tags which is partially implemented (waterway) and discussed in several other tickets like #9819.

Is this the solution? I can start working on it if it is!

comment:11 Changed 12 months ago by GerdP

What's wrong with two highways that share a node but have different layer=* values? I can't think of any reason for a warning.

comment:12 Changed 12 months ago by skyper

We should collect some example in a file. One of the most simple cases is a X-crossing of two high-/rail-/waterway with different layer=* which looks odd in my eyes (#18202).

comment:13 Changed 12 months ago by reichg

For routing purposes the example from #18202, would this route a driver to turn onto/into the tunnel?

Last edited 12 months ago by reichg (previous) (diff)

comment:14 Changed 12 months ago by GerdP

In the example the tunnel is not connected to the motorway, so no. I assume the example is wrong and was meant to have a connection. In that case I do indeed miss a warning as a motorway should not have crossings.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to aceman
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.