Imported Upstream version 1.5
[routino] / doc / TAGGING.txt
1                            Routino : Tagging Rules
2                            =======================
3
4
5    The different tags and attributes in the OSM format XML that are used
6    by Routino are described below.
7
8    An important change for version 1.4 of Routino is that the tags in the
9    input file are first processed according to a set of rules defined in a
10    configuration file. This means that the information presented here is
11    in two parts; firstly the tags that are recognised by Routino after
12    pre-processing and secondly the transformations in the default
13    configuration file.
14
15
16 Tags Recognised After Processing
17 --------------------------------
18
19    This section describes the tags that are recognised by Routino after
20    the tag transformations have been applied. This is therefore a much
21    reduced set of tags compared to the original OSM data and also includes
22    tags which are specific to Routino.
23
24    In all cases of tag processing values of true, yes, 1 are recognised as
25    being affirmative and any other value is ignored.
26
27
28 Node Tags And Attributes
29 ------------------------
30
31    The node attributes id, latitude and longitude are used. The id
32    atribute is required to associate the node with the ways and the
33    position attributes are required to locate the node.
34
35 Transport Specific Tags
36 - - - - - - - - - - - -
37
38    One tag is recognised for each of the different modes of transport:
39    foot, horse, bicycle, wheelchair, moped, motorbike, motorcar, goods,
40    hgv and psv. These indicate whether the specific type of transport is
41    allowed to pass through the node or not.
42
43    By default for nodes all types of transport are allowed to pass through
44    a node and specific tags must be used to remove the permissions for the
45    transport.
46
47 Way Tags And Attributes
48 -----------------------
49
50    The tags from the ways in the data are the ones that provide most of
51    the information for routing. The id attribute is used only so that the
52    many segments associated with a way can be share a set of tags taken
53    from the way.
54
55 The highway Tag
56 - - - - - - - -
57
58    The most important tag that is used from a way is the highway tag. This
59    defines the type of highway that the way represents. Any way that does
60    not have a highway tag is discarded.
61
62    There are more highway types defined than are used by the router. The
63    subset that the router uses are:
64      * motorway
65      * trunk
66      * primary
67      * secondary
68      * tertiary
69      * unclassified
70      * residential
71      * service
72      * track
73      * cycleway
74      * path (1)
75      * steps (2)
76
77    Note 1: This changed in version 1.3 of Routino - the bridleway and
78    footway types were included within the path highway type.
79    Note 2: This changed in version 1.3 of Routino - the steps type was
80    separated from the footway type.
81
82 Transport Specific Tags
83 - - - - - - - - - - - -
84
85    One tag is recognised for each of the different modes of transport:
86    foot, horse, bicycle, wheelchair, moped, motorbike, motorcar, goods,
87    hgv and psv. These indicate whether the specific type of transport is
88    allowed on the highway or not.
89
90    By default for ways no types of transport are allowed to pass along a
91    highway and specific tags must be used to add the permissions for the
92    transport.
93
94 The name Tag
95 - - - - - -
96
97    The name tag is used to provide the label for the highway when printing
98    the results.
99
100 The ref Tag
101 - - - - - -
102
103    The ref tag is used to provide the label for the highway when printing
104    the results.
105
106 The junction Tag
107 - - - - - - - -
108
109    The junction tag is used to check if a highway is (part of) a
110    roundabout. This tag is used for information to label the highway if no
111    other name is provided.
112
113 The multilane Tag
114 - - - - - - - - -
115
116    The multilane tag is used to identify whether a highway has multiple
117    lanes for traffic and this sets one of the highway properties. There is
118    not normally a multilane tag but one needs to be added by the tag
119    processing transformations. Values of true, yes, 1 are recognised.
120
121 The paved Tag
122 - - - - - - -
123
124    The paved tag is used to identify whether a highway is paved or not,
125    this is one of the available highway properties. A paved tag may exist
126    in the original data but normally the surface tag needs to be
127    transformed into the paved tag.
128
129 The bridge Tag
130 - - - - - - -
131
132    The bridge tag is used to identify whether a highway is a bridge and
133    therefore set one of the available properties.
134
135 The tunnel Tag
136 - - - - - - -
137
138    The tunnel tag is used to identify whether a highway is a tunnel and
139    therefore set one of the available properties.
140
141 The footroute Tag
142 - - - - - - - - -
143
144    The footroute tag is used to identify whether a highway is part of a
145    walking route and therefore set one of the available properties. This
146    is not a standard OSM tag and is normally added to the individual
147    highways by looking for route relations that are designated for foot
148    access.
149
150 The bicycleroute Tag
151 - - - - - - - - - -
152
153    The bicycleroute tag is used to identify whether a highway is part of a
154    bicycle route and therefore set one of the available properties. This
155    is not a standard OSM tag and is normally added to the individual
156    highways by looking for route relations that are designated for bicycle
157    access.
158
159 The oneway Tag
160 - - - - - - -
161
162    The oneway tag is used to specify that traffic is only allowed to
163    travel in one direction.
164
165 The maxspeed Tag
166 - - - - - - - -
167
168    The maxspeed tag is used to specify the maximum speed limit on the
169    highway; this is always measured in km/hr in OpenStreetMap data. If the
170    tag value contains "mph" then it is assumed to be a value in those
171    units and converted to km/hr.
172
173 The maxweight Tag
174 - - - - - - - - -
175
176    The maxweight tag is used to specify the maximum weight of any traffic
177    on the highway. In other words this must be set to the heaviest weight
178    allowed on the highway (for example a bridge) in tonnes. If the tag
179    value contains "kg" then it is assumed that the value is in these units
180    and converted to tonnes.
181
182 The maxheight Tag
183 - - - - - - - - -
184
185    The maxheight tag is used to specify the maximum height of any traffic
186    on the highway. In other words this must be set to the lowest height of
187    anything above the highway (like a bridge) in metres. If the tag value
188    contains a measurement in feet or feet and inches then attempts are
189    made to convert this to metres.
190
191 The maxwidth Tag
192 - - - - - - - -
193
194    The maxwidth tag is used to specify the maximum width of any traffic on
195    the highway. This must be set to the minimum width of the contraints at
196    the wayside in metres. If the tag value contains a measurement in feet
197    or feet and inches then attempts are made to convert this to metres.
198
199 The maxlength Tag
200 - - - - - - - - -
201
202    The maxlength tag is used to specify the maximum length of any traffic
203    on the highway (usually from a traffic sign) in metres. If the tag
204    value contains a measurement in feet or feet and inches then attempts
205    are made to convert this to metres.
206
207 Relation Tags And Attributes
208 ----------------------------
209
210    The tags from the relations are used to associate more properties with
211    the highways that are part of that relation. The id attribute is used
212    so that relations that are members of other relations can be
213    identified.
214
215 The footroute Tag
216 - - - - - - - - -
217
218    The footroute tag is used to identify whether a relation defines a
219    walking route and therefore should be applied to the individual member
220    highways.
221
222 The bicycleroute Tag
223 - - - - - - - - - -
224
225    The bicycleroute tag is used to identify whether a relation defines a
226    bicycle route and therefore should be applied to the individual member
227    highways.
228
229
230 Tag Transformations
231 -------------------
232
233    This section describes the set of tag transformations that are
234    contained in the default configuration file. The configuration file
235    tagging rules are applied in sequence and this section of the document
236    is arranged in the same order.
237
238
239 Node Tag Transformations
240 ------------------------
241
242 Barrier Defaults
243 - - - - - - - -
244
245    The first part of the tag transformations is to decide on defaults for
246    each type of node. This uses the barrier tag in the OSM file and
247    converts it into a default set of disallowed transport types.
248
249    Barrier      foot horse wheelchair bicycle moped motorbike motorcar goods hgv psv
250    -------      ---- ----- ---------- ------- ----- --------- -------- ----- --- ---
251    bollard      yes   yes   yes        yes     yes   yes       no        no   no  no
252    kissing_gate yes    no    no         no      no    no       no        no   no  no
253    stile        yes    no    no         no      no    no       no        no   no  no
254    turnstile    yes    no    no         no      no    no       no        no   no  no
255
256 Generic Access Permissions
257 - - - - - - - - - - - - -
258
259    The access tag is used to specify the default access restrictions
260    through the node. If the tag value is no or private then all transport
261    types are denied access (later tag transformation rules may add
262    specific transport types back again).
263
264 Other Access Permissions
265 - - - - - - - - - - - -
266
267    A tag named vehicle means any of the bicycle, moped, motorbike,
268    motorcar, goods, hgv and psv transport types. A tag named motor_vehicle
269    is transformed to mean any vehicle except a bicycle.
270
271 Specific Access Permissions
272 - - - - - - - - - - - - - -
273
274    The final part of the access permissions is to use the specific
275    transport type tags.
276
277    One tag is recognised for each of the different modes of transport:
278    foot, horse, bicycle, wheelchair, moped, motorbike, motorcar, goods,
279    hgv and psv. These indicate whether the specific type of transport is
280    allowed through the node or not.
281
282 Way Tag Transformations
283 -----------------------
284
285 Highway Defaults
286 - - - - - - - -
287
288    The first part of the tag transformations is to decide on defaults for
289    each type of highway. This uses the highway tag in the OSM file and
290    maps it into one of the highway tags that are recognised by Routino,
291    defining the default allowed transport types and adding a number of
292    properties.
293
294    The first part of the transformation is to convert the highway tag into
295    one that is recognised by Routino.
296
297    Original tag  Transformed tag
298    ------------  ---------------
299    bridleway     path
300    byway         track
301    footway       path
302    living_street residential
303    minor         unclassified
304    pedestrian    path
305    road          unclassified
306    services      service
307    unsurfaced    track
308    unpaved       track
309    walkway       path
310
311    The type of highway also determines the defaults for the types of
312    transport allowed on the highway. The default assumptions are as shown
313    in the table below.
314
315    Highway      foot horse  wheelchair bicycle moped motorbike motorcar goods hgv psv
316    -------      ---- -----  ---------- ------- ----- --------- -------- ----- --- ---
317    motorway     no   no     no         no      no    yes       yes      yes   yes yes
318    trunk        no   no     no         yes     yes   yes       yes      yes   yes yes
319    primary      yes  yes    yes        yes     yes   yes       yes      yes   yes yes
320    secondary    yes  yes    yes        yes     yes   yes       yes      yes   yes yes
321    tertiary     yes  yes    yes        yes     yes   yes       yes      yes   yes yes
322    unclassified yes  yes    yes        yes     yes   yes       yes      yes   yes yes
323    residential  yes  yes    yes        yes     yes   yes       yes      yes   yes yes
324    service      yes  yes    yes        yes     yes   yes       yes      yes   yes yes
325    track        yes  yes    yes        yes     no    no        no       no    no  no
326    cycleway     yes  no     yes        yes     no    no        no       no    no  no
327    path         yes  yes(1) yes        yes(1)  no    no        no       no    no  no
328    steps        yes  no     yes        no      no    no        no       no    no  no
329
330    Note 1: A path allows bicycle or horse access by default only if
331    actually labelled as a highway of type "bridleway" or certain values of
332    the designation tag (described below).
333
334    Finally for the highway tag a number of properties are added depending
335    on the highway type.
336
337    Highway      Properties
338    -------      ----------
339    motorway     paved, oneway, multilane
340    trunk        paved
341    primary      paved
342    secondary    paved
343    tertiary     paved
344    unclassified paved
345    residential  paved
346    service      paved
347    track        paved (1)
348    cycleway     paved
349    path         paved (2)
350    steps
351
352    Note 1: A track is paved only if it is tagged as tracktype=grade1.
353    Note 2: A path is paved only if it was originally tagged as
354    highway=walkway or highway=pedestrian.
355
356 Generic Access Permissions
357 - - - - - - - - - - - - -
358
359    The access tag is used to specify the default access restrictions on
360    the highway. If the tag value is "no" or "private" then all transport
361    types are denied access (later tag transformation rules may add
362    specific transport types back again).
363
364 Other Access Permissions
365 - - - - - - - - - - - -
366
367    A tag named vehicle means any of the bicycle, moped, motorbike,
368    motorcar, goods, hgv and psv transport types. A tag named motor_vehicle
369    is transformed to mean any vehicle except a bicycle.
370
371    The designation tag is used as an alternative method of identifying the
372    legal right of way on a path (in the UK at least). The tag
373    transformations convert these tags into a set of allowed transport
374    types as shown below.
375
376    Designation tag      Equivalent access permissions
377    ---------------      -----------------------------
378    bridleway or         foot=yes, wheelchair=yes, horse=yes,
379      public_bridleway     bicycle=yes
380    restricted_byway     foot=yes, wheelchair=yes, horse=yes,
381                           bicycle=yes
382    byway                foot=yes, wheelchair=yes, horse=yes,
383                           bicycle=yes, moped=yes, motorbike=yes,
384                           motorcar=yes
385    footpath or          foot=yes, wheelchair=yes
386      public_footpath
387
388 Specific Access Permissions
389 - - - - - - - - - - - - - -
390
391    The final part of the access permissions is to use the specific
392    transport type tags.
393
394    One tag is recognised for each of the different modes of transport:
395    foot, horse, bicycle, wheelchair, moped, motorbike, motorcar, goods,
396    hgv and psv. These indicate whether the specific type of transport is
397    allowed on the highway or not.
398
399 Highway Properties
400 - - - - - - - - -
401
402    If there is a surface tag then the highway is assumed to be unpaved
403    unless the tag value matches one of the following: paved, asphalt or
404    concrete.
405
406    Support for the obsolete paved tag is also provided and the highway is
407    paved if this is set to a true value.
408
409    The lanes tag is used to identify whether a highway has multiple lanes
410    for traffic or not (the number of lanes is not important in this case,
411    only whether it is more than one) this sets one of the highway
412    properties.
413
414    The bridge and tunnel tags are copied directly from the input to the
415    output.
416
417 Highway Restrictions
418 - - - - - - - - - -
419
420    The oneway, maxspeed, maxweight, maxheight, maxwidth and maxlength are
421    copied directly from the input to the output without modification.
422
423 Highway Names and References
424 - - - - - - - - - - - - - -
425
426    The name and ref tags are copied directly from the input to the output.
427
428
429 Relation Tag Transformations
430 ----------------------------
431
432 Routes
433 - - -
434
435    The route tag can be used to determine whether a relation is part of a
436    walking of bicycle route so that the footroute and bicycleroute
437    properties can be applied to the highways that make up that relation.
438
439    The tag transformations that are applied for route relations are
440    defined in the table below.
441
442            Relation Tag         footroute Property bicycleroute Property
443    foot                         yes                no
444    walking                      yes                no
445    hiking                       yes                no
446    bicycle                      no                 yes
447    bicycle;foot or foot;bicycle yes                yes
448
449
450 --------
451
452 Copyright 2008-2010 Andrew M. Bishop.