RU:Conditional restrictions

From OpenStreetMap Wiki
Jump to navigation Jump to search
Logo. Объект : Conditional restrictions
One example for Объект : Conditional restrictions
Описание
Чтобы указать теги ограничений которые зависят от условия.
Группа

ограничения

Теги

broom

Help (89606) - The Noun Project.svg

Эта статья описывает как отмечать ограничения которые зависят от условий.

Простые теги для указания ограничений, например access=private или maxspeed=60, широко используется для обозначения основных видов запретов. Если ограничение применяется только к определённой категории транспортных средств (или к средствам транспортировки), то ключ тега может быть расширен путем добавления к нему этой информации. Примером являются oneway:bicycle=no и maxspeed:hgv=80. Режим доступа может быть указан просто как ограничение, которое применяется только к этому виду транспорта. Пример hgv=no вместо access:hgv=no.

В некоторых случаях ограничения действительны только при выполнении определенных условий. Примером может быть ограничение скорости в 60 км во время между 06:00 и 20:00. В соответствии с настоящей схемой такой пример можно отметить как maxspeed:conditional=60 @ (06:00-20:00).

Описание схемы тегирования поможет понять как обозначать ограничения по условию в OpenStreetMap.

Как обозначать

Схема использует тот же синтаксис что и обычные теги безусловных ограничений, но со следующими отличиями: ключ оканчивается суффиксом :conditional. Значение включает в себя фактическое значение, знак '@' и условие состояния.

Общий синтаксис тега выглядит следующим образом (поля в квадратных скобках [..] являются необязательными):

<тип_ограничения>[:<средство_транспортировки>][:<направление>]:conditional
  = <значение_ограничения> @ <условие>[;<значение_ограничения> @ <условие>]

В тегах задающих ограничения доступа средствам транспортировки часть access: обычно опускается.

<средство_транспортировки>[:<направление>]:conditional
  = <значение_ограничения> @ <условие>[;<значение_ограничения> @ <условие>]

Ключ

Ключ указывают таким же образом как и обычные ключи соответствующих ограничений с дополнительным суффиксом :conditional.

Тип_ограничения

Тут указывают любой тип ограничения который может иметь срок действия. Типичными примерами являются ограничения скорости maxspeed=* и направления движения oneway=*.

Тип ограничения должен отражать "основной" дорожный знак. Для знака Vorschriftszeichen 1.svg с дополнительной табличкой задающей условие тип должен быть access. А для знака Nederlands verkeersbord C17.svg тип ограничения должен быть maxlength (аналогично и для других знаков max<величина>).

Средство_транспортировки

Эта часть ключа определяет категорию транспортного средства или средства транспортировки к которой относится ограничение. Например bicycle, motor_vehicle, foot, agricultural (велосипеды, механические транспортные средства, пешеходы, сельскохозяйственная техника). Для ограничения доступа допускается использовать сокращенную форму без access: перед категорией. Например motorcar вместо access:motorcar. Пожалуйста, обратите внимание, что agricultural обозначает тип транспортного средства (как правило, тракторы или специальные машине с низкой максимальной скоростью), а не тип использования шоссе.

См. RU:Key:access#Ограничения по видам транспорта чтобы увидеть все типы средств транспортировки.

Направление

Некоторые ограничения зависят от направления. Использование forward и backward позволяет указать в каком направлении действует ограничение. Значение зависит от направления в котором рисуется линия в OpenStreetMap. Для руководства о том как определить это в Potlatch 2 и для получения дополнительной информации нажмите здесь.

Значение

Значение включает в себя фактическое ограничение, последующий символ @ и условие. Добавьте пробелы до и после символа @ для улучшения читабельности.

Обычно есть только одно значение условия. В исключительных случаях может быть необходимо использовать два или больше значений - пар состояния. Такие пары должны быть разделены точкой с запятой. В одном месте может быть указан предел скорости в определенное время дня, а другой (более низкий) предел скорости в случае дождя. См. ниже Conflicting Restrictions о том как записывать множественные значения (пары).

Значение_ограничения

Здесь указывают обычные значения для соответствующих ограничений, например yes, private, 80, 55 mph. Ограничение может быть абсолютным (yes, no, permissive и другие значения которые применимы к каждому), в зависимости от цели использования дороги (destination, delivery, customer, forestry, agricultural и т.п.) или в соответствии с явным разрешением (private, permit_holder).

Условие

Это поле определяет условие для которого ограничение является действительным. Можно выделить несколько видов условий.

  • Время и День: Используйте обычный синтаксис тега opening_hours=*. Условие содержащее значения разделённые точкой с запятой заключают в скобки.
  • Дорожные условия: Например wet (дождь), snow (снег). It is noted that the condition wet corresponds to :wet in e.g. maxspeed:wet=*. Using wet as a condition is recommended in order to streamline the syntax of restriction tags ("maxspeed:wet" was introduced at a time when no proper way of tagging conditional restrictions existed).
  • Свойства транспортного средства: Примерами свойств являются weight, axleload, length, width, height и draught (для судов). Используйте относительные операторы (<, >, =) для определения условия. Например (weight<7.5).
  • Использование транспортного средства: Ограничение зависит от того, как используется транспортное средство (например количество пассажиров или груза). Примеры: (occupants>1) (типичное условие возможности использования транспортного средства на полосе " высокой плотности" - месте, где можно ехать только с количеством пассажиров не меньшим чем разрешено), hazmat (транспортное средство, перевозящее опасные материалы).
  • User group: The restriction relates to a specific user group, e.g. doctor, disabled, emergency, female.
  • Purpose of access: For restriction types expecting a numerical restriction value such as maxweight the condition may be a purpose-of-access condition (destination, delivery etc) or a permission type condition (private etc). Example: maxweight=2.5 + maxweight:conditional=none @ destination.

Except for very simple conditions like "wet" or "Su" it is recommended to enclose the condition in brackets.

Combined conditions: AND

Two or more partial conditions may be combined using the operator AND. It is recommended to use the uppercase form to improve readability. AND means that both partial conditions must be fulfilled for the condition to apply. Example access:conditional=destination @ (Sa-Su AND weight>7).

Default restrictions

It is not always clear which restriction applies when the condition is not fulfilled. In such cases the default restriction should also be specified. E.g maxspeed=120 + maxspeed:conditional=100 @ (20:00-06:00). In some cases a default restriction can be assumed and need not be explicitly tagged. For many highway classes like unclassified an implicit access=yes is assumed. See OSM_tags_for_routing/Access-Restrictions for default access restrictions for different highway classes.

Evaluation of conflicting restrictions

When an object has two or more different restrictions both matching the given traffic and conditions the following algorithm determines which one is valid.

  1. A restriction having a more specific transportation mode overrules a less specific transportation mode. E.g. a tag for "psv" overrules a tag for "motor_vehicle" in case of a public service vehicle. See Key:access#Transport mode restrictions for the transport mode hierarchy.
  2. A directional restriction overrules a non-directional restriction of the same transportation mode
  3. A conditional restriction overrules a non-conditional restriction of the same transportation mode and direction
  4. In case of multiple matching value-condition pairs in the same tag the last matching value becomes the effective restriction value. Therefore it is important to put the more general restriction first and the more specific restriction last. Some examples:
    • (access=yes) + access:conditional=no @ (09:00-17:00); destination @ (09:00-17:00 AND disabled) will allow destination traffic for disabled persons (the last match) while all other traffic isn't allowed 9am-5pm. The time condition needs to be repeated in the second value, otherwise disabled persons would only have destination access 17:00-09:00 while all other traffic would have general access.
    • (maxspeed=none) + maxspeed:conditional=120 @ (06:00-20:00); 80 @ wet: Here the 80 at wet will overrule the time based restriction in case of wet conditions.
    • (access=no) + access:conditional=delivery @ (07:00-11:00); customer @ (07:00-17:00): Here is actually no conflict as only one value can match (the purpose of access must match in case of destination, customer, delivery, agricultural and forestry).

Deprecated tags

This scheme deprecates the following tags when they are used in combination with restriction tags.

day_on=*, day_off=*, date_on=*, date_off=*, hour_on=*, hour_off=*

By-use modes

The present scheme treats the by-use modes hov=*, emergency=*, hazmat=* and disabled=* as conditions, not as transportation modes. This will allow more complex restrictions like access:conditional=destination @ (hazmat:A AND weight>7.5). It is recommended to tag such by-use modes as real conditions instead of using pseudo-transportation modes although such tagging is not explicitly deprecated with this scheme.

Does not apply to:

Examples

Photo Tagging Interpretation
Speedlimit120-timecondition.jpg maxspeed=130
maxspeed:conditional=120 @ (06:00-19:00)
Maxspeed limited to 120 km/h 6-19 h but 130 km/h otherwise (example from Dutch motorway).
maxspeed=none
maxspeed:conditional=120 @ (06:00-20:00); 100 @ (22:00-06:00)
Two conditional maxspeed values valid at different times of day (this is a real example from a motorway in Germany).
Conditional-access-bicycle-and-delivery.jpg highway=pedestrian

motor_vehicle:conditional=delivery @ (Mo-Fr 06:00-11:00,17:00-19:00;Sa 03:30-19:00)
bicycle=yes
bicycle:conditional=no @ (Sa 08:00-16:00)
mofa=no
moped=no

Complex example from a Dutch pedestrian street. Delivery traffic ("bevoorradingsverkeer") allowed access at certain time intervals. Bicycles ("fietsen") are allowed except on Saturdays 8-16 h. Mofas and mopeds ("snor- en bromfietsen") not allowed.
access:conditional=destination @ (weight>5.5) Vehicles over 5.5t are only allowed for destination traffic.
Maxweight except buses and for loading.jpg maxweight=7.5
maxweight:bus=none
maxweight:conditional=none @ delivery
There is a maxweight restriction which is overruled by maxweight:bus (as this includes a more specific transportation mode) and by maxweight:conditional (a conditional restriction of the same transportation type - i.e. none specified - as maxweight=). Therefore the maximum weight of 7.5t applies to all vehicles except buses and those loading ('delivery').
Length and time restriction 2.jpg motor_vehicle:conditional=no @ (10:00-18:00 AND length>5) Motor vehicles longer than 5 meter not allowed 10am - 6pm
UK motor restriction sign with exceptions.jpg highway=tertiary

motor_vehicle=no
motor_vehicle:conditional=yes @ (18:30-07:30)
psv=yes

This is a camera-enforced "bus gate"; motor vehicles are prohibited from 07:30 to 18:30 except for PSVs. Times need to be switched around (against as they appear on the sign) if you want to use motor_vehicle=no as a fallback
Hgv-no-overtaking-condition.jpg overtaking:hgv:conditional=no @ (Mo-Fr 06:00-19:00) Overtaking not permitted for heavy goods vehicles 6-19h on weekdays (example from Dutch motorway)
oneway:conditional=yes @ Su

oneway:bicycle=no

Street is oneway on Sundays but bicycles may use it in both directions at all times. The second tag overrules the conditional tag because of the specific transportation mode 'bicycle'.
Speed limit of 60 for HGV with weight more than 7.5t.jpg maxspeed=80

maxspeed:hgv:conditional=60 @ (weight>7.5)

Example for a conditional speed limit applicable to a specific transportation mode.

См. также