NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I see two ways of adding a barrier (gate): 1. Click on the road way, add vertex and then designate this node as a barrier 2. Choose the Point editing tool and add a separate node, tag as barrier --> gate.

Which is the recommended approach? I'm thinking a node on the road way would be best, is this node associated with road way? I see a lot of instances where a user will add a point as the gate/barrier but it's not on the road way itself, but may be very close in proximity. How do routing engines handle this?

asked 20 Jun '18, 23:09

markzawi's gravatar image

accept rate: 0%


"How do routing engines handle this?" They don't if it is not part of the way.

(21 Jun '18, 07:47) scai ♦

I always put it on the way. I believe JOSM even complains with a warning for barrier nodes that are not placed on a way. It is an obstacle on a road, so it also belongs there.

It is also described as such on the wiki.

AFAIK, there are not a lot of routing engines that block routing over a way when there is only a node with access restrictions. They only use access restrictions on the way. IMHO, this is a bug and not a reason to add a short OSM way with restrictions. An example is a bollard in the middle of the road that can be approached from both sides. In such case it should be suffcient to add a node with e.g. barrier=bollard; motor_vehicle=no

permanent link

answered 21 Jun '18, 04:22

escada's gravatar image

accept rate: 21%

edited 21 Jun '18, 06:20

Privatemajory's gravatar image



Both OSRM and Graphhopper, the two most popular routing engines, will block routes through barrier nodes if configured appropriately. (For example,, which uses OSRM, will not route bikes past a barrier=stile.)

(21 Jun '18, 08:17) Richard ♦

Richard, thank you for this info. It's great to hear that they start to implement this.

(21 Jun '18, 08:20) escada

Thanks for the replies, much appreciated @escada

(22 Jun '18, 01:19) markzawi

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 20 Jun '18, 23:09

question was seen: 2,260 times

last updated: 22 Jun '18, 01:19

NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum