RU:Relation:connectivity
| Описание |
|---|
| Отношение типа "from-via-to", которое указывает, как полосы движения на дороге участника отношения "from" соединяются с полосами участника отношения "to". |
| Участники |
|
|
| Статус: одобрено |
| Инструменты |
|
Отношение connectivity - это тип отношения, используемый для указания того, как полосы движения двух сегментов дороги соединяются друг с другом. В большинстве случаев способ соединения полос движения можно определить без использования отношения connectivity, но чаще без отношения connectivity не обойтись.
Как и когда использовать отношения connectivity
Существует несколько ситуаций, когда отношение connectivity может быть полезным.
- Количество полос движения на автомагистрали меняется, но по тегу
placement=*невозможно определить, какие полосы движения вливаются в другие и как они связаны. - Невозможно точно отобразить перекресток, используя только
turn:lanes=*. Чаще это наблюдается именно в тех местах, где есть несколько пересечений дорог, расположенных близко друг к другу, и важно, какую полосу движения использует навигатор для поворота, чтобы вывести маршрут на правильную полосу для "следующего" поворота. - Разметка полос движения на земле не отражает фактические пути прохождения перекрестка или упрощена для водителей. Примером этого может служить полоса для поворота налево на перекрестке, которую в некоторых случаях также можно использовать для продолжения движения прямо и поворота налево на следующем перекрестке.
Во всех этих случаях может использоваться одно или несколько соотношений connectivity, каждое из которых соединяет полосы движения двух дорог.
Чтобы добавить отношение connectivity, создайте новое отношение и добавьте в него три (или более) участника:
- Линию с ролью
, которая является начальной дорогой в отношении.
from - Одну точку с ролью
или одну или несколько линий с ролью
via, которые проходят через перекрёсток.
via - Линию с ролью
, которая является конечной дорогой в отношении.
to
Участники отношения с ролью {role|via}} должны быть точками, когда это возможно, но иногда нужно использовать линию. Дело в том, что часто встречаются размеченные полосы движения до и после участка дороги, на котором вообще нет размеченных полос движения. И тут непонятно, как участник отношения с ролью может быть точкой? Ведь этот неразмеченный участок не точка. А участок дороги без разметки не может принимать роль
via или
from, поскольку на нём нет размеченных полос движения. Для этого есть простое решение. И оно состоит в том, чтобы установить немаркированную линию в качестве участника отношения с ролью
to, чтобы "пройти" через него, просто указав, как полосы движения до и после него соединяются с этой линией.
via
Отношение определяет, как полосы в линии с ролью соединяются с полосами движения в линии с ролью
from.
to
Каждое отношение должно иметь два тега:
| Тег | Описание |
|---|---|
type=connectivity
|
Для обозначения того, что отношение имеет тип "connectivity". |
connectivity=*
|
Для указания того, при движении с каких полос на линии с ролью Синтаксис значения должен выглядеть как список Полоса движения в линии с ролью |
Примеры
| Отношение в OSM | Изображение | Маркировка |
|---|---|---|
| 9496175 |
Здесь должно быть создано отношение с участниками Значение в теге connectivity означает следующее:
Система нумерации полос совпадает с нумерацией, уже используемой в Символ "вертикальная палочка" | следует использовать для разделения соединений с разными полосами движения. Каждая полоса движения на линии с ролью | |
| 9680471 |
A connectivity relation should be used here to indicate which lanes the right turn lanes in It should have the tags | |
| 9607206 |
A from-via-to relation could be used on the right highway to express the lane connectivity here.
The relation should have the tags | |
| 9529781 |
A from-via-to relation could be used here to represent which lanes in the It should have the tags Note that lane #3 in the | |
| 9646478 |
A from-via-to relation of type connectivity could be used here to describe how the lanes in It should have the tags | |
| 9526433 |
A from-via-to relation of type connectivity was used here to describe how the 3 lanes in The relation should have the tags This could be useful to navigation because the highway soon splits, and the right two lanes separate from the left two lanes. Knowing which lanes end up in which destinations in advance would be useful to navigation. | |
| 9619789 |
After the split, this road has two lanes. Then, at node labelled Via, highway becomes three-lane. A relation can be used here to describe this: it should have tags type="connectivity" and connectivity="2:3" - lane #1 in The connectivity relation should have the tags | |
| Two connectivity relations could be used to mark what the actual connectivity of this small junction is, since the turn:lanes values aren't representative of reality.
Green relation: Red relation: | ||
| 9502717 |
A connectivity relation could be used to mark how 3 lanes become 6 lanes at the point. The connectivity relation should have the tags | |
| 9516178 |
A connectivity relation could be used to mark what the "through" part of the oneway road actually means.
The relation should have the tags Note that this intersection could be modelled differently to make this work without connectivity relations, but that would change other factors (such as the angle at which they connect to the secondary road), and would not be preferable. | |
| 9502616 |
A connectivity relation could be used here to describe how the 4 lanes in The relation should have the tags | |
| 16622295 |
This unusual sign, which has corresponding road markings, is located at a T-intersection near another intersection. The three left turn lanes are assigned to specific lanes after the T-intersection. | |
Default connectivity
Basic summary
In most cases, no connectivity relation is needed, since the connectivity can be assumed based on other factors.
If the number of lanes in that can be used to access
from is the same as the number of lanes in
to, no relation is needed. This number of lanes is based on the
toturn:lanes=* tag of the way.
from
In some cases, a connectivity relation can be used to override turn:lanes=* tags, making it totally fine to have what appears to be the default connectivity.
The tag placement=* can also specify lane connectivity. If two roads connect at a node, and placement tags have been added to both, the lane connectivity should be assumed based on those tags.
For placement=*, it should be assumed that any new lanes (lanes that just started and aren't directly connected to a lane in according to the
fromplacement=* tags of and
from) are extensions of existing lanes. This means that if a 2 lane highway with
toplacement=right_of:1 becomes a 3 lane highway with placement=right_of:1, the connectivity is assumed to be 1:1|2:2,(3), not 1:1|2:2.
The tag placement=* should not be used to specify lane connectivity if there are more than 2 highways connected to the via node. This is usually at intersections, motorway junctions, or places where two highways merge together.
In the case where several highways merge together into one highway, it can be assumed that the leftmost highway's lanes connect to the left lanes of , and that the rightmost highway's lanes connect to the rightmost lanes of
to. For example, if two 2 lane highways merge together into a 4 lane highway, the connectivity is assumed to be 1:1|2:2 from the left from way, and 1:3|2:4 from the right from way, and no relation is needed.
to
When 3 or more highways merge together at a certain point, the left and rightmost ways can have assumed connectivity, but any
from highways in between will need a relation to clear up ambiguity.
from
In sum, connectivity can be assumed in the following cases:
- The number of lanes in the
way equals the number of lanes in the
fromway.
to - Placement tags specify the connectivity between two ways, but not at an intersection.
- Several highways merge together - assume that the lanes of the left and right
highways stay to their side in the
fromway.
to
Data consumer / pseudocode summary
Data consumers should get the lane connectivity between two ways in OSM as follows:
if (connectivityRelationExistsBetweenRoadsAtVia) {
use the relation
} else if ((number of lanes in from that can access to) == (number of lanes in to)) {
use default connection
} else if (placement of from/to has clear connectivity AND there are only those two highways connected at the via point) {
use placement of from/to including default placement
} else if (several oneway roads connect with only one outlet... aka roads merge together) {
The leftmost from way's lanes should be assumed to stay to the left in 'to'
The rightmost from way's lanes should be assumed to stay to the right in 'to'
Any middle roads shouldn't have any assumed connectivity unless the number of lanes in those are equal to the number of lanes in 'to'.
} else {
a relation is missing and no connectivity can be assumed.
}
Additional notes
- Via members can be ways - see this example. Any number of ways may be included as via members, but in a situation where either a way or a node could be used, it's better to just use a node for clarity.
- All lanes included in the :lanes tags of the from / to ways can be included in connectivity relations. For example, if bike lanes are tagged in the turn:lanes tag of the from and to ways, then they should be included in the corresponding connectivity relation as if they were a normal lane. Bus lanes are the same.
- These relations should only be used in places where lane connectivity is not default - see above.
- Both_ways lanes are supported by this relation: simply use
bwinstead of the lane number inside of the syntax. For example, the tagconnectivity=bw:bw|1:1|2:2specifies that the both_ways lanes in from and to connect to each other, and that lanes 1 and 2 do so as well. - This is invalid syntax:
connectivity=1,2:1|3:2- don't place two different from lanes in the same statement (1,2:1has both 1 and 2 from the from way inside of the same statement). Useconnectivity=1:1|2:1|3:2instead. - These relations can be used with two way roads without additional tags - just tag the lane numbers for the direction of the relation.
- It should be assumed that no lane changes are possible at the intersection that the relation is located. For example, if the from way and to way both have 2 lanes and no change allowed, it should not be assumed that you can jump from the left lane to the right lane at the via node / way(s).
- Conditional lane connectivity, or lane connectivity that changes depending on the time, should be mapped with
type=connectivityandconnectivity=*, withconnectivity:conditional=*being used to override the main connectivity tag at certain times or conditions. These cases are very rare, soconnectivity:conditional=*wont be needed often. See this example mapillary image of modular turn lane signage for proof that this is possible. - This relation type doesn't specify what "turn" travelling from the from way to the to way is - that should be added in the
turn:lanes=*tag of the from way, since that is where it is specified in the real world. Another option for this is to use atype=manoeuvreortype=maneuverrelation, which are supported by OSRM, but aren't very common. - When a from/to highway doesn't have any "lanes", or is completely unmarked, its "lane" should be given the lane number
1in the syntax ofconnectivity=*, since one line of vehicles can enter/leave the highway.
Software support
JOSM will validate connectivity relations as of r16295. The Lane Connectivity plugin (listed as intersection in the JOSM plugin list) allows you to create connectivity relations visually in JOSM, however, this plugin is unmaintained since 2019 and will not work with current (as of r19439)[1].
The iD editor has a preset and field for entering connectivity relations. It lacks a lane editor in general, but you can easily create a connectivity relation using the turn restriction editor: select the node that connects the ways, create a turn restriction from and to the same ways that you want to connect, select the relation that you just created, and change the preset to Connectivity, ensuring that the restriction=* tag has been removed. This workaround sets the correct ,
from, and
via members.
to
The Valhalla routing engine supports an older, incompatible syntax from this draft proposal. This issue tracks upgrading Valhalla to the approved syntax.
Requests for support in data consumers:
