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

Do you add a gate by node on a way, or by adding a point by itself?

2

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

markzawi
71448
accept rate: 0%

2

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

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

One Answer:

7

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

answered 21 Jun '18, 04:22

escada's gravatar image

escada
19.0k16166302
accept rate: 21%

edited 21 Jun '18, 06:20

Privatemajory's gravatar image

Privatemajory
1.1k142233

5

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

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

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

(21 Jun '18, 08:20) escada
1

Thanks for the replies, much appreciated @escada

(22 Jun '18, 01:19) markzawi

Source code available on GitHub .