How to tag these Bamboo Cattle gates?

How should I tag these bamboo stick gates that keep cattle from wandering? One must manually slides the bamboo sticks to the side to be able pass in. They’re usually on the motorcycle and dirt tracks farmers use. These paths connect different farms and sometimes villages, so they rarely mean it’s private.

None of the provided wiki examples under barrier=* align with what I’m searching for. Do you have any suggestions?

Options considered:

  • barrier=gate
  • barrier=sliding_gate
  • barrier=bump_gate
  • barrier=cattle_grid
  • barrier=hampshire_gate
0 voters

Additionally, what are your thoughts on using access?

  • not needed
  • access=permissive
  • access=yes
0 voters

I voted on barrier but not access, because for access, it depends…

Edit because I was asked to clarify: For access, it depends on the specific situation. Your survey didn’t include that option, so I didn’t vote (and I noticed that others didn’t either). yes is for when you have a legal right to go through: if someone put a locked gate there you could have it removed by some authority. permissive for something like when a private landowner lets you use the gate but they could change their mind and put a locked gate there any time. I would use no value if I don’t know.

Access tagging is weird and complicated and as far as I know the distinction above was created because of the legal situation in the UK around public rights of way, so I don’t know if it makes sense in Thailand! What further complicates it is that some people would say that access=yes implies that you can drive through it, so something like access=no foot=yes bicycle=yes motorcycle=yes would be more appropriate. And then sometimes access tags on a barrier are used to say not what the legal situation is but who can physically fit through, see the discussion on bollards.

Luckily this all doesn’t matter too much in practice: the data consumers (routers, renderers) I know of do not make a distinction between no value, yes and permissive on a gate.

1 Like

Why the thumbs down?

I’d use barrier=gate with whatever access tag is appropriate here, plus gate:type=*. You might have to browse Taginfo or invent and document a new tag value to represent this type of gate.

1 Like

I’m quite skeptical about that. In fact, I anticipate that, for the majority of routers, the absence of an access value would typically imply no access by default.

For example, OsmAnd won’t generate a route through a barrier=gate if there are no valid access tags present, unless the user activates a setting to permit private access.

<select value="0"  t="access" v="yes"/>
<select value="0"  t="access" v="permissive"/>
<if param="allow_private">
	<select value="300" t="barrier" v="gate"/>
<select value="-1" t="barrier" v="gate"/>

source: OsmAnd-resources/routing/routing.xml at master · osmandapp/OsmAnd-resources · GitHub


Interesting! I don’t use OSMAnd, so I didn’t know that.

I’ve just checked the three routers on with some example locations.

Looks like GraphHopper and OSRM will route cars and bicycles through an untagged gate (see
here and here). Valhalla prefers a longer route to the same destination, avoiding the gate. All three routers will route pedestrians through the gate.

When there is no other way to get to the destination e.g. here and here, all three routers will route through the gate.

If I am reading the documentation right, Valhalla will take a detour of up to five minutes to avoid a gate without access tagging. The other two routers seem to ignore it, at least in their default profiles.

Organic Maps behaves similarly to Valhalla for cars but routes cyclists through the gate.

I tested this in Scotland and Thailand. I don’t know if the routers use any country-specific defaults.

Not sure what to conclude from this. When I know who is allowed through, I tag it, when I don’t, I don’t :slight_smile:

1 Like

Could definitely introduce a new tag value later on.

What should I put in gate:type ? I’m not sure, but I think setting something now could make future migrations easier if there’s a new value for the barrier tag.

I wouldn’t use a new barrier tag. It’s essentially still a gate, so using multiple different main tags for that would be impractical. Instead you can add gate:type=sliding + material=wood + a note=* tag.

1 Like

Thanks for your valuable feedback!

Based on responses and votes, here would be the recommended tags for this gate:


Important notes:

  • Minimal tagging is indicated in bold.
  • The access tag is crucial, as certain routers may not route through the gate without it.
1 Like