This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

How to set a month access restriction for a road?

1

How to set up a Month restriction for a road? I have a road which is only allowed to drive from July to November. How to set this up?

asked 19 Nov '13, 16:18

ivolino's gravatar image

ivolino
169232329
accept rate: 0%

edited 19 Nov '13, 17:32

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554

There's also this previous question, if it helps.

(19 Nov '13, 17:00) SomeoneElse ♦

… note: that other question is in fact a collection of questions.

(19 Nov '13, 17:22) aseerel4c26 ♦

One Answer:

3

You can use conditional access restrictions. They support conditions based on the time and date which have to be specified using the opening_hours syntax.

To forbid any motor vehicle from December to June, use

motor_vehicle:conditional=no @ (Dec-Jun)

Alternatively you could disallow motor vehicles by default and only allow them between July and November:

motor_vehicle=no
motor_vehicle:conditional=yes @ (Jul-Nov)

But be aware that the second solution completely disallows motor vehicles for all applications that can't handle conditional restrictions.

answered 19 Nov '13, 16:44

scai's gravatar image

scai ♦
33.3k21309459
accept rate: 23%

edited 19 Nov '13, 16:46

Source code available on GitHub .