OSM tag mapping
This page is intended to give an overview of which OpenStreetMap(OSM) tags OTP uses to evaluate its walking and bicycling instructions. If a tag is not part of the documentation on this page then this tag mapper (profile) does not use it.
The exception are access permissions and wheelchair accessibility tags like
access=nowheelchair=nooneway=yes
These are identical for all mappers and not separately listed on this page.
Way properties
Way properties set a way's permission and optionally influences its walk and bicycle safety factors.
These factors determine how desirable an OSM way is when routing for cyclists and pedestrians. Lower safety values make an OSM way more desirable and higher values less desirable. They are applied as a multiplier to the traversal cost when safety is enabled. As the router minimizes the total cost of traversal, this results in choosing a path with lower safety values, however if the only paths available are of high safety values, it acts as a further reluctance for walking and cycling compared to taking transit when safety is enabled.
How the safety values work was changed between versions 2.9 and 2.10. Before the change, a safety normalizer would multiply the values set by the mapper such that the most desirable way had a safety factor of 1.0, so that the use of safety would only further increase, but not decrease. the reluctance. This was found to be problematic because of two reasons:
- Cycling was seen to be more undesirable than expected, even on a quiet residential way, because there are certain combinations of tags in the map which produced exceptionally low safety values. For more details, see #6775.
- The effect of the values set in the tag mappers were unpredictable, as it depended on one single way which could be anywhere in the map. Increasing or decreasing the map coverage could change the effect on the same way.
The normalizer has been removed in version 2.10, so the safety values are applied directly without change. As a result, some of the values in the tag mappers have also changed to compensate for the effect that they will not be multiplied further.
For details, see #6782.
| specifier | permission | bike safety | walk safety |
|---|---|---|---|
highway one of [motorway, motorway_link] |
CAR |
||
highway one of [trunk, trunk_link, primary, primary_link]; motorroad=yes |
CAR |
||
highway one of [trunk, trunk_link, primary, primary_link, secondary, secondary_link, tertiary, tertiary_link, unclassified, residential] |
ALL |
||
cycleway=track; highway one of [trunk, trunk_link, primary, primary_link, secondary, secondary_link, tertiary, tertiary_link, unclassified, residential] |
ALL |
||
cycleway=lane; highway one of [trunk, trunk_link, primary, primary_link, secondary, secondary_link, tertiary, tertiary_link] |
ALL |
1.27 | |
cycleway=lane; maxspeed < 50; highway one of [trunk, trunk_link, primary, primary_link, secondary, secondary_link, tertiary, tertiary_link] |
ALL |
1.1 | |
cycleway=lane; highway one of [unclassified, residential] |
ALL |
1.1 | |
highway=service |
ALL |
||
highway=service; service=parking_aisle |
ALL |
2.5 | |
highway=service; service=drive-through |
ALL |
2.5 | |
highway=living_street |
ALL |
1.83 | |
highway=pedestrian |
PEDESTRIAN_AND_BICYCLE |
1.2 | |
highway=busway |
PEDESTRIAN_AND_BICYCLE |
2.37 | 1.9 |
highway=service; bus one of [yes, designated] |
PEDESTRIAN_AND_BICYCLE |
2.37 | 1.9 |
highway=footway |
PEDESTRIAN_AND_BICYCLE |
1.42 | |
highway=cycleway |
PEDESTRIAN_AND_BICYCLE |
1.05 | 1.4 |
highway=cycleway; lanes > 1 |
PEDESTRIAN_AND_BICYCLE |
1.4 | |
highway=cycleway; oneway=yes |
PEDESTRIAN_AND_BICYCLE |
1.4 | |
highway=cycleway; sidewalk one of [yes, left, right, both] |
PEDESTRIAN_AND_BICYCLE |
1.05 | |
highway=cycleway; lanes > 1; sidewalk one of [yes, left, right, both] |
PEDESTRIAN_AND_BICYCLE |
||
highway=cycleway; oneway=yes; sidewalk one of [yes, left, right, both] |
PEDESTRIAN_AND_BICYCLE |
||
highway=cycleway; foot=designated; segregated=no |
PEDESTRIAN_AND_BICYCLE |
1.05 | 1.15 |
highway=path; foot=designated; bicycle=designated; segregated=no |
PEDESTRIAN_AND_BICYCLE |
1.05 | 1.15 |
highway=cycleway; foot=designated; segregated=yes |
PEDESTRIAN_AND_BICYCLE |
1.05 | |
highway=path; foot=designated; bicycle=designated; segregated=yes |
PEDESTRIAN_AND_BICYCLE |
1.05 | |
highway=cycleway; foot=designated; segregated=yes; lanes > 1 |
PEDESTRIAN_AND_BICYCLE |
||
highway=cycleway; foot=designated; present(segregated); motor_vehicle=destination |
PEDESTRIAN_AND_BICYCLE |
1.57 | |
highway=path; foot=designated; bicycle=designated; present(segregated); motor_vehicle=destination |
PEDESTRIAN_AND_BICYCLE |
1.57 | |
highway=footway; footway=sidewalk |
PEDESTRIAN_AND_BICYCLE |
1.93 | 1.1 |
highway=footway; footway=crossing |
PEDESTRIAN_AND_BICYCLE |
2.33 | 1.35 |
highway=cycleway; cycleway=crossing |
PEDESTRIAN_AND_BICYCLE |
2.33 | 1.35 |
highway=track |
PEDESTRIAN_AND_BICYCLE |
||
highway=bridleway |
PEDESTRIAN_AND_BICYCLE |
||
highway=path |
PEDESTRIAN_AND_BICYCLE |
||
highway=steps |
PEDESTRIAN |
||
highway=elevator |
PEDESTRIAN |
||
highway=corridor |
PEDESTRIAN |
||
highway=footway; indoor=yes |
PEDESTRIAN |
||
highway=platform |
PEDESTRIAN |
||
public_transport=platform |
PEDESTRIAN |
||
trail_visibility one of [bad, low, poor, horrible, no]; highway=path |
NONE |
||
sac_scale one of [demanding_mountain_hiking, alpine_hiking, demanding_alpine_hiking, difficult_alpine_hiking]; highway one of [path, steps] |
NONE |
||
smoothness one of [horrible, very_horrible]; highway one of [path, bridleway, track] |
PEDESTRIAN |
1.15 | |
smoothness=impassable; highway one of [path, bridleway, track] |
NONE |
||
1 > mtb:scale < 2; highway one of [path, bridleway, track] |
PEDESTRIAN |
1.15 | |
mtb:scale > 2; highway one of [path, bridleway, track] |
NONE |
Safety mixins
Mixins are selectors that have an effect on the bicycle and walk safety factors. Their safety values are multiplied with the base values from the selected way properties.
Mixins can also add or remove permissions on an OSM way, which will be further overridden with explicitly set permission tags. If two mixins add and remove the same permission on the same way, the behavior is unspecified which usually indicates a tagging error on the way.
Multiple mixins can apply to the same way and their effects compound.
| matcher | add permission | remove permission | bicycle safety | walk safety |
|---|---|---|---|---|
cycleway=shared_lane; highway one of [trunk, trunk_link, primary, primary_link, secondary, secondary_link, tertiary, tertiary_link, unclassified, residential] |
0.85 | |||
lcn=yes¦rcn=yes¦ncn=yes |
0.85 | |||
oneway=yes; cycleway not one of [no, none] or absent; highway one of [trunk, trunk_link, primary, primary_link, secondary, secondary_link, tertiary, tertiary_link, unclassified, residential] |
no direction: 1.0 forward: 1.0 back: 1.15 |
|||
embedded_rails one of [tram, light_rail, disused] |
1.2 | |||
tunnel=yes; highway one of [trunk, trunk_link, primary, primary_link, secondary, secondary_link, tertiary, tertiary_link, unclassified] |
2.0 | 2.0 | ||
bridge=yes; sidewalk not one of [no, separate] or absent; highway one of [trunk, trunk_link, primary, primary_link, secondary, secondary_link, tertiary, tertiary_link, unclassified]¦verge=no; sidewalk not one of [no, separate] or absent; highway one of [trunk, trunk_link, primary, primary_link, secondary, secondary_link, tertiary, tertiary_link, unclassified] |
2.0 | |||
junction=roundabout; sidewalk not one of [no, separate] or absent |
2.0 | |||
surface=grass_paver |
1.2 | |||
surface=sett |
1.2 | |||
surface=cobblestone |
1.2 | |||
surface=unhewn_cobblestone |
3.0 | |||
surface=metal_grid |
1.2 | |||
surface=metal |
1.2 | |||
smoothness=intermediate; surface one of [asfalt, concrete, paving_stones, paved, wood] |
1.2 | |||
smoothness=bad; surface one of [asfalt, concrete, paving_stones, paved, wood] |
1.4 | 1.6 | ||
surface=unpaved; !tracktype |
1.8 | 1.6 | ||
surface=compacted |
1.4 | 1.4 | ||
surface=fine_gravel |
1.8 | 1.6 | ||
surface=pebblestone |
1.8 | 1.6 | ||
surface=gravel |
1.8 | 1.6 | ||
surface=woodchip |
1.8 | 1.6 | ||
surface=ground |
2.3 | 2.4 | ||
surface=dirt |
2.3 | 2.4 | ||
surface=earth |
2.3 | 2.4 | ||
surface=grass |
2.3 | 1.8 | ||
surface=mud |
3.0 | 3.0 | ||
surface=sand |
3.0 | 1.8 | ||
!tracktype; surface not one of [unpaved] or absent; highway one of [track, bridleway] |
1.8 | 1.6 | ||
tracktype=grade2; surface not one of [unpaved] or absent; highway one of [track, bridleway, service, unclassified] |
1.4 | 1.4 | ||
tracktype=grade3; surface not one of [unpaved] or absent; highway one of [track, bridleway, service, unclassified] |
1.8 | 1.6 | ||
tracktype=grade4; surface not one of [unpaved] or absent; highway one of [track, bridleway, service, unclassified] |
2.3 | 1.8 | ||
tracktype=grade5; surface not one of [unpaved] or absent; highway one of [track, bridleway, service, unclassified] |
2.3 | 2.4 | ||
surface not one of [no, none] or absent; highway=path |
2.3 | 2.4 | ||
sac_scale=mountain_hiking |
1.8 | |||
trail_visibility=intermediate |
1.8 |