Traffic lights and routing on dual carriaged intersections

Skip to first unread message

Curtis Brown

unread,
Jul 25, 2019, 3:26:43 PM7/25/19
to Osmand
Hi everyone,

I want to ask about traffic lights in dual-carriaged intersections. Sometimes the intersections have traffic_lights on the intersecting nodes where the ways cross, and sometimes the lights are outside of the intersecting nodes. Here are two examples of intersections and the different ways traffic_lights are placed:


I have been moving traffic lights out out of these intersections, largely for the reason brought up here:


I would see that if a user needs to make a left turn, through an intersection with lights on intersecting nodes, the router would penalize the path heavily for having to route through three traffic lights in a row. I have been told that if the intersection has lights in the intersecting nodes, that is sufficient for mapping and should not change. The OSM Wiki page seems to state that "there is no well established convention on how this problem should be ideally solved".


I am genuinely curious to know from OsmAnd developers what their point of view is. Does OsmAnd's routing prefer traffic_lights moved out of intersecting nodes of dual-carriaged intersections, or does its routing treat a cluster of traffic_light'd nodes as a single weight?                         

Thank you in advance for helping me understand.   -curtis

Greg Troxel

unread,
Jul 25, 2019, 7:52:28 PM7/25/19
to Curtis Brown, Osmand
Curtis Brown <cur...@rams.colostate.edu> writes:

> I am genuinely curious to know from OsmAnd developers what their point of
> view is. Does OsmAnd's routing prefer traffic_lights moved out of
> intersecting nodes of dual-carriaged intersections, or does its routing
> treat a cluster of traffic_light'd nodes as a single weight?

I don't know, but you should understand that it's not really ok to
adjust tagging based on what osmand does.

My understanding of traffic light tagging is that there should be
highway=traffic_signals at road junctions, such that any traversal of
the intersection that encounters a signal in reality will traverse one
in the representation. And, that paths through in the representation
that hit multiple signals should not be penalized more than hitting one.
That's partially because when there are multiple signals they are
coordinated.

The simplest case to illustrate this is a dual carriageway with a single
carrriageway at right angles, with a light. There should be a
highway=traffic_signals at each of the two junctions. But, on turning
left (assuming US drive-on-right), one will not be controlled by or
delayed by the other one, because if you have a left green arrow, the
other one is ok.

It seems obvious that a router should behave reasonably with any tagging
scheme that has significant use, or it's broken.


Now, if there is a consensus among 80% of the routers out there, that's
sort of a de facto tagging semantics definition. But you can't
(properly) just adjust to what osmand wants.

Keep in mind that there is a lot of wiki fiddling, so that what's in the
wiki may represent a paper exercise by someone separate from how the
tags are actually used.

The proper forum for arguing about how signals should be tagged is
tag...@openstreetmap.org.

CP

unread,
Jul 26, 2019, 6:39:45 AM7/26/19
to osm...@googlegroups.com

Op 25-07-19 om 21:26 schreef Curtis Brown:
I have been moving traffic lights out out of these intersections, largely for the reason brought up here:

Please don't, Curtis.  Tagging is:
1 - Describe what you physically see ("Hey, I see a sign" )
2 - Describe what it does ("Hmm, that makes it one way traffic" )

Moving traffic lights to come to the rescue of some bad router violates both rules.

Thanks,
CP

Curtis Brown

unread,
Jul 26, 2019, 11:20:50 AM7/26/19
to Osmand
Thank you Greg and CP for reminding me about the principles of ground truth. I understand you are supposed to tag what is on the ground, do not map against Mapnik styles, etc., etc.. I have stopped my practice about moving traffic lights. I'm sorry I didn't provide that detail.

My original question was not about how to map traffic lights, but how OsmAnd's routing algorithms handle this situation. I understand that routers *should* treat a cluster of lights as a singularity. I am attemping to learn if OsmAnd's particular implmentation of A* routing handles that or not.

As a larger picture to better understand this, I plan on asking developers from OSRM and GraphHopper as well.

I understand that OsmAnd is unique in that you can customize broad routing decisions by modifying routing.xml:


But the file crudely hints that triple lights are not handled. It still doesn't explain if and how double lights are weighted when, say, going straight through a double carriaged intersection.

If this is not a group that the devs listen to, I apologize for taking up everyone's time. I will keep looking elsewhere.

stf

unread,
Jul 27, 2019, 12:02:20 PM7/27/19
to Osmand
The original question referenced the OSM wiki about "complex intersections" at https://wiki.openstreetmap.org/wiki/Tag:highway%3Dtraffic_signals#Complex_intersections

My much preferred tagging, not for any specific data consumer like OsmAnd, is to "tag all incoming ways" as illustrated at https://wiki.openstreetmap.org/wiki/Tag:highway%3Dtraffic_signals#Tag_all_incoming_ways

The fact that it might make it easier for a router like OsmAnd is nice but the real reason is that in reality you don't have to stop two or three traffic lights in the middle of an intersection and I think the "tag all incoming ways" better models reality.

Curtis' tagging edits meet the intent of OSM, is documented in the wiki and is widely used. So I wonder if you actually read the link given before writing "Please don't".

CP

unread,
Aug 5, 2019, 1:51:50 PM8/5/19
to osm...@googlegroups.com
Hi,

Being the one doing the "Please don't": I indeed have not read the wiki lemmas you're referring to. I will definitely read up on that and refrain from further lecturing before I've done that.
Thanks for the pointer. These kind of contributions keep us (me) awake and are very useful.

Ceaus


Op 27-07-19 om 18:02 schreef stf:
--
You received this message because you are subscribed to the Google Groups "Osmand" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osmand+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osmand/ab2331c2-d5a9-41b2-834a-7c74ce12d1ea%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages