How to tag motorcycle access only?

Two questions, really:

What is the best way to say “Legally, no motorized vehicles except motorcycles”? (Foot and non-motorized bicycle traffic is also allowed.)

  1. motorcycle=yes + motor_vehicle=no
  2. motorcycle=designated
  3. maxwidth= some arbitrary motorcycle-ish width
  4. Something else

What effect does motorcycle=yes + motor_vehicle=no have?

  1. Nonmotorized motorcycles only
  2. All motorized vehicles are disallowed except motorcycles (this is what I want to communicate)
  3. This tag combination is nonsensical
  4. Something else

The access keys form a hierarchy: when deciding if you can travel on a way, you start by looking for the most-specific key (in your case, motorcycle=), and work your way up (motor_vehicle=, vehicle=, and finally access=) until you find a match.

If you tag the way as motorcycle=yes and motor_vehicle=no:

  • A motorcycle will find the motorcycle=yes tag and know immediately that a motorcycle is permitted.
  • A car will look for motorcar= and not find it, then look for motor_vehicle= and see that motor vehicles are not allowed.
  • A bicycle will look for bicycle= and not find it, look for vehicle= and not find it, look for access= and not find it, and go with the default access for the type of way.
6 Likes

This is the correct tagging.

More specific modes of transport override more general ones. As noted above, this forms a hierarchy.

2 Likes

I would note that typically vehicle categories in law are not actually arranged in a hierarchy. That is just a cs-nerd driven assumption.

We have motorcar=no and motorcycle=yes to handle this case.

motor_vehicle=no and motorcycle=yes is a confusing, unnecessary contradiction. This contrived hierarchy is a mess

So do you propose

motorcycle=yes
atv=no
side_by_side=no
motorcar=no
rickshaw=no
tractor=no
snowmobile=no
...

?

1 Like

If you tag it motorcar=no and motorcycle=yes, at least some routers will send large trucks (hgv=) along the route.

1 Like

This is perfectly legal and normal road a sign banning access from all motor vehicles and then clarifying that mopeds and residential access are allowed.

So it would evaluate to motor_vehicle=destination moped=yes.

The law may not have a section discussing vehicle hierarchy, but its existence is implicit from the signs the law defines.

The sign in question is a Vienna Convention one and is a good example, because if mopeds (even what a moped is) are considered included in the motorcycle category is one of the differences between signatory countries.

If we go strictly to Vienna Convention, that sign doesn’t forbid just cars and motorcycles. It’s “No entry for power-driven vehicles”. A “moped” is a “power-driven vehicle”.

Multiple countries have, as noted in the convention, a different sign for that.

Ok, but how does this work out for the claim that:

OSM hierarchy mismatching actual legal definition (that differ between countries) often cause issues, but in this specific case (“no motor vehicles except motorcycles”) it works fine

and your proposed confusing hierarchy is actually far worse

1 Like

Whether mopeds are treated as power-driven vehicles in the Vienna Convention depends on national legislation. From the Convention:

“Motor cycle” means any two-wheeled vehicle with or without a side-car, which is equipped with a propelling engine. Contracting Parties may also treat as motor cycles in their domestic legislation three-wheeled vehicles whose unladen mass does not exceed 400 kg (900 lb). The term “motor cycle” does not include mopeds, although Contracting Parties may, provided they make a declaration to this effect in conformity with Article 46, paragraph 2, of this Convention, treat mopeds as motor cycles for the purposes of the Convention;

“Power-driven vehicle” means any self-propelled road vehicle, other than a moped in the territories of Contracting Parties which do not treat mopeds as motor cycles, and other than a rail-borne vehicle;

It is useful to explicitly add tags for moped and mofa because these are included in the OSM definition of motor_vehicle. For example, when tagging this sign in the Netherlands, it gets the additional tags moped=yes (because mopeds are not considered motorcycles in the Netherlands) and mofa=yes.

1 Like

Not quite sure what your point is? Laws put vehicles into categories and some categories overlap in a way that one includes the other, hence the possibility to exclude some modes of transport from restrictions.
Technically, this forms a partial order, because a vehicle can belong to multiple independent categories. This is CS-nerd territory.

OSM always has to figure out a compromise between global consistency and local deviations.
On the one hand, one could just defer to “local legislation” and define motor_vehicle to be whatever the country in question defines as such; this can include mopeds or not. This hasn’t happened, for various reasons, so OSM uses a single “hierarchy” for all countries with its own definition for what qualifies as what.
Which categories to use and how to define them isn’t a technical question, it’s a matter of consensus.

Since OP didn’t mention any country, the best answer to

What is the best way to say “Legally , no motorized vehicles except motorcycles”?

is “It depends”, since all provided answers are wrong. If you want to add that detail, you are free to do so.

This sentence doesn’t add anything to that end.

2 Likes

What does the sign say? I might add atv=no.

I didn’t propose a hierarchy. I said to make it explicit and not contradictory