1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5 Routino documentation - tagging
7 Part of the Routino routing software.
9 This file Copyright 2008-2010 Andrew M. Bishop
11 This program is free software: you can redistribute it and/or modify
12 it under the terms of the GNU Affero General Public License as published by
13 the Free Software Foundation, either version 3 of the License, or
14 (at your option) any later version.
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU Affero General Public License for more details.
21 You should have received a copy of the GNU Affero General Public License
22 along with this program. If not, see http://www.gnu.org/licenses/.
26 <TITLE>Routino : Tagging Rules</TITLE>
27 <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
28 <LINK href="style.css" type="text/css" rel="stylesheet">
35 <div class="header" align="center">
37 <h1>Routino : Tagging Rules</h1>
44 <!-- Content Start -->
48 <h2><a name="H_1_1"></a>Tags And Attributes</h2>
50 The different tags and attributes in the
51 <a class="ext" title="OpenStreetMap" href="http://www.openstreetmap.org/">OSM</a>
52 format XML that are used by Routino are described below.
56 An important change for version 1.4 of Routino is that the tags in the input
57 file are first processed according to a set of rules defined in a configuration
58 file. This means that the information presented here is in two parts; firstly
59 the tags that are recognised by Routino after pre-processing and secondly the
60 transformations in the default configuration file.
63 <h2><a name="H_1_2" title="After Processing"></a>Tags Recognised After Processing</h2>
65 This section describes the tags that are recognised by Routino after the tag
66 transformations have been applied. This is therefore a much reduced set of tags
67 compared to the original OSM data and also includes tags which are specific to
72 In all cases of tag processing values of <em>true</em>, <em>yes</em>, <em>1</em>
73 are recognised as being affirmative and any other value is ignored.
76 <h3><a name="H_1_2_1" title="Nodes"></a>Node Tags And Attributes</h3>
78 None of the node tags are used but the node attributes <em>id</em>, <em>latitude</em>
79 and <em>longitude</em> of the node. The id atribute is required to associate the
80 node with the ways and the position attributes are required to locate the node.
83 <h3><a name="H_1_2_2" title="Ways"></a>Way Tags And Attributes</h3>
85 The tags from the ways in the data are the ones that provide most of the
86 information for routing. The <em>id</em> attribute is used only so that the
87 many segments associated with a way can be share a set of tags taken from the
91 <h4><a name="H_1_2_2_1" title="highway"></a>The highway Tag</h4>
93 The most important tag that is used from a way is the <em>highway</em> tag.
94 This defines the type of highway that the way represents. Any way that does not
95 have a highway tag is discarded.
99 There are more highway types defined than are used by the router. The subset
100 that the router uses are:
120 Note 1: This changed in version 1.3 of Routino - the bridleway and footway
121 types were included within the path highway type.
123 Note 2: This changed in version 1.3 of Routino - the steps type was separated
124 from the footway type.
128 <h4><a name="H_1_2_2_2" title="transport tags"></a>Transport Specific Tags</h4>
130 One tag is recognised for each of the different modes of transport: <em>foot</em>,
131 <em>horse</em>, <em>bicycle</em>, <em>wheelchair</em>, <em>moped</em>,
132 <em>motorbike</em>, <em>motorcar</em>, <em>goods</em>, <em>hgv</em>
133 and <em>psv</em>. These indicate whether the specific type of transport is
134 allowed on the highway or not.
137 <h4><a name="H_1_2_2_3" title="name"></a>The name Tag</h4>
139 The <em>name</em> tag is used to provide the label for the highway when printing
143 <h4><a name="H_1_2_2_4" title="ref"></a>The ref Tag</h4>
145 The <em>ref</em> tag is used to provide the label for the highway when printing
149 <h4><a name="H_1_2_2_5" title="junction"></a>The junction Tag</h4>
151 The <em>junction</em> tag is used to check if a highway is (part of) a
152 roundabout. This tag is used for information to label the highway if no other
156 <h4><a name="H_1_2_2_6" title="multilane"></a>The multilane Tag</h4>
158 The <em>multilane</em> tag is used to identify whether a highway has multiple
159 lanes for traffic and this sets one of the highway properties. There is not
160 normally a <em>multilane</em> tag but one needs to be added by the tag
161 processing transformations. Values of <em>true</em>, <em>yes</em>, <em>1</em>
165 <h4><a name="H_1_2_2_7" title="paved"></a>The paved Tag</h4>
167 The <em>paved</em> tag is used to identify whether a highway is paved or not,
168 this is one of the available highway properties. A <em>paved</em> tag may exist
169 in the original data but normally the <em>surface</em> tag needs to be
170 transformed into the paved tag.
173 <h4><a name="H_1_2_2_8" title="bridge"></a>The bridge Tag</h4>
175 The <em>bridge</em> tag is used to identify whether a highway is a bridge and
176 therefore set one of the available properties.
179 <h4><a name="H_1_2_2_9" title="tunnel"></a>The tunnel Tag</h4>
181 The <em>tunnel</em> tag is used to identify whether a highway is a tunnel and
182 therefore set one of the available properties.
185 <h4><a name="H_1_2_2_10" title="oneway"></a>The oneway Tag</h4>
187 The <em>oneway</em> tag is used to specify that traffic is only allowed to
188 travel in one direction.
191 <h4><a name="H_1_2_2_11" title="maxspeed"></a>The maxspeed Tag</h4>
193 The <em>maxspeed</em> tag is used to specify the maximum speed limit on the
194 highway; this is always measured in km/hr in OpenStreetMap data. If the tag
195 value contains "mph" then it is assumed to be a value in those units and
199 <h4><a name="H_1_2_2_12" title="maxweight"></a>The maxweight Tag</h4>
201 The <em>maxweight</em> tag is used to specify the maximum weight of any traffic
202 on the way. In other words this must be set to the heaviest weight allowed on
203 the way (for example a bridge) in tonnes. If the tag value contains "kg" then
204 it is assumed that the value is in these units and converted to tonnes.
207 <h4><a name="H_1_2_2_13" title="maxheight"></a>The maxheight Tag</h4>
209 The <em>maxheight</em> tag is used to specify the maximum height of any traffic
210 on the way. In other words this must be set to the lowest height of anything
211 above the way (like a bridge) in metres. If the tag value contains a
212 measurement in feet or feet and inches then attempts are made to convert this to
216 <h4><a name="H_1_2_2_14" title="maxwidth"></a>The maxwidth Tag</h4>
218 The <em>maxwidth</em> tag is used to specify the maximum width of any traffic on
219 the way. This must be set to the minimum width of the contraints at the wayside
220 in metres. If the tag value contains a measurement in feet or feet and inches
221 then attempts are made to convert this to metres.
224 <h4><a name="H_1_2_2_15" title="maxlength"></a>The maxlength Tag</h4>
226 The <em>maxlength</em> tag is used to specify the maximum length of any traffic
227 on the way (usually from a traffic sign) in metres. If the tag value contains a
228 measurement in feet or feet and inches then attempts are made to convert this to
232 <h3><a name="H_1_2_3" title="Relations"></a>Relation Tags And Attributes</h3>
234 Currently no relation tags or attributes are used.
237 <h2><a name="H_1_3" title="Tag Transformations"></a>Tag Transformations</h2>
239 This section describes the set of tag transformations that are contained in the
240 default configuration file. The configuration file tagging rules are applied in
241 sequence and this section of the document is arranged in the same order.
244 <h3><a name="H_1_3_1" title="Nodes"></a>Node Tag Transformations</h3>
246 No transformations are applicable since no node tags are recognised.
249 <h3><a name="H_1_3_2" title="Ways"></a>Way Tag Transformations</h3>
252 <h4><a name="H_1_3_2_1" title="Highway Defaults"></a>Highway Defaults</h4>
254 The first part of the tag transformations is to decide on defaults for each type
255 of highway. This uses the highway tag in the OSM file and maps it into one of
256 the highway tags that are recognised by Routino, defining the default allowed
257 transport types and adding a number of properties.
261 The first part of the transformation is to convert the highway tag into one that
262 is recognised by Routino.
267 <caption>Mapping of equivalent highway types</caption>
269 <th class="left">Original tag
270 <th class="left">Transformed tag
272 <td class="left">bridleway
273 <td class="left">path
275 <td class="left">byway
276 <td class="left">track
278 <td class="left">footway
279 <td class="left">path
281 <td class="left">living_street
282 <td class="left">residential
284 <td class="left">minor
285 <td class="left">unclassified
287 <td class="left">pedestrian
288 <td class="left">path
290 <td class="left">road
291 <td class="left">unclassified
293 <td class="left">services
294 <td class="left">service
296 <td class="left">unsurfaced
297 <td class="left">track
299 <td class="left">unpaved
300 <td class="left">track
302 <td class="left">walkway
303 <td class="left">path
308 The type of highway also determines the defaults for the types of transport
309 allowed on the highway. The default assumptions are as shown in the table
315 <caption>Transport types on different highway types</caption>
317 <th class="left">Highway
318 <th class="center">foot
319 <th class="center">horse
320 <th class="center">bicycle
321 <th class="center">wheelchair
322 <th class="center">moped
323 <th class="center">motorbike
324 <th class="center">motorcar
325 <th class="center">goods
326 <th class="center">hgv
327 <th class="center">psv
329 <td class="left">motorway
330 <td class="center">no
331 <td class="center">no
332 <td class="center">no
333 <td class="center">no
334 <td class="center">no
335 <td class="center">yes
336 <td class="center">yes
337 <td class="center">yes
338 <td class="center">yes
339 <td class="center">yes
341 <td class="left">trunk
342 <td class="center">no
343 <td class="center">no
344 <td class="center">no
345 <td class="center">yes
346 <td class="center">yes
347 <td class="center">yes
348 <td class="center">yes
349 <td class="center">yes
350 <td class="center">yes
351 <td class="center">yes
353 <td class="left">primary
354 <td class="center">yes
355 <td class="center">yes
356 <td class="center">yes
357 <td class="center">yes
358 <td class="center">yes
359 <td class="center">yes
360 <td class="center">yes
361 <td class="center">yes
362 <td class="center">yes
363 <td class="center">yes
365 <td class="left">secondary
366 <td class="center">yes
367 <td class="center">yes
368 <td class="center">yes
369 <td class="center">yes
370 <td class="center">yes
371 <td class="center">yes
372 <td class="center">yes
373 <td class="center">yes
374 <td class="center">yes
375 <td class="center">yes
377 <td class="left">tertiary
378 <td class="center">yes
379 <td class="center">yes
380 <td class="center">yes
381 <td class="center">yes
382 <td class="center">yes
383 <td class="center">yes
384 <td class="center">yes
385 <td class="center">yes
386 <td class="center">yes
387 <td class="center">yes
389 <td class="left">unclassified
390 <td class="center">yes
391 <td class="center">yes
392 <td class="center">yes
393 <td class="center">yes
394 <td class="center">yes
395 <td class="center">yes
396 <td class="center">yes
397 <td class="center">yes
398 <td class="center">yes
399 <td class="center">yes
401 <td class="left">residential
402 <td class="center">yes
403 <td class="center">yes
404 <td class="center">yes
405 <td class="center">yes
406 <td class="center">yes
407 <td class="center">yes
408 <td class="center">yes
409 <td class="center">yes
410 <td class="center">yes
411 <td class="center">yes
413 <td class="left">service
414 <td class="center">yes
415 <td class="center">yes
416 <td class="center">yes
417 <td class="center">yes
418 <td class="center">yes
419 <td class="center">yes
420 <td class="center">yes
421 <td class="center">yes
422 <td class="center">yes
423 <td class="center">yes
425 <td class="left">track
426 <td class="center">yes
427 <td class="center">yes
428 <td class="center">yes
429 <td class="center">yes
430 <td class="center">no
431 <td class="center">no
432 <td class="center">no
433 <td class="center">no
434 <td class="center">no
435 <td class="center">no
437 <td class="left">cycleway
438 <td class="center">yes
439 <td class="center">no
440 <td class="center">yes
441 <td class="center">yes
442 <td class="center">no
443 <td class="center">no
444 <td class="center">no
445 <td class="center">no
446 <td class="center">no
447 <td class="center">no
449 <td class="left">path
450 <td class="center">yes
451 <td class="center">yes (1)
452 <td class="center">yes
453 <td class="center">yes (1)
454 <td class="center">no
455 <td class="center">no
456 <td class="center">no
457 <td class="center">no
458 <td class="center">no
459 <td class="center">no
461 <td class="left">steps
462 <td class="center">yes
463 <td class="center">no
464 <td class="center">no
465 <td class="center">no
466 <td class="center">no
467 <td class="center">no
468 <td class="center">no
469 <td class="center">no
470 <td class="center">no
471 <td class="center">no
477 Note 1: A path allows bicycle or horse access by default only if actually
478 labelled as a highway of type "bridleway" or certain values of
479 the <em>designation</em> tag (described below).
484 Finally for the highway tag a number of properties are added depending on the
490 <caption>Properties on different highway types</caption>
492 <th class="center">Highway
493 <th class="center">Properties
495 <td class="center">motorway
496 <td class="center">paved, oneway, multilane
498 <td class="center">trunk
499 <td class="center">paved
501 <td class="center">primary
502 <td class="center">paved
504 <td class="center">secondary
505 <td class="center">paved
507 <td class="center">tertiary
508 <td class="center">paved
510 <td class="center">unclassified
511 <td class="center">paved
513 <td class="center">residential
514 <td class="center">paved
516 <td class="center">service
517 <td class="center">paved
519 <td class="center">track
520 <td class="center">paved (1)
522 <td class="center">cycleway
523 <td class="center">paved
525 <td class="center">path
526 <td class="center">paved (2)
528 <td class="center">steps
535 Note 1: A track is paved only if it is tagged as tracktype=grade1.
537 Note 2: A path is paved only if it was originally tagged as highway=walkway or
542 <h4><a name="H_1_3_2_2" title="Generic access"></a>Generic Access Permissions</h4>
544 The <em>access</em> tag is used to specify the default access restrictions on
545 the way. If the tag value is "no" or "private" then all transport types are
546 denied access (later tag transformation rules may add specific transport types
550 <h4><a name="H_1_3_2_3" title="Other access"></a>Other Access Permissions</h4>
552 A tag named <em>vehicle</em> means any of the <em>bicycle</em>, <em>moped</em>,
553 <em>motorbike</em>, <em>motorcar</em>, <em>goods</em>, <em>hgv</em>
554 and <em>psv</em> transport types. A tag named <em>motor_vehicle</em> is
555 transformed to mean any vehicle except a <em>bicycle</em>.
559 The <em>designation</em> tag is used as an alternative method of identifying the
560 legal right of way on a path (in the UK at least). The tag transformations
561 convert these tags into a set of allowed transport types as shown below.
566 <caption>Aliasing of designation types</caption>
568 <th class="left">Designation tag
569 <th class="left">Equivalent access permissions
571 <td class="left">bridleway or public_bridleway
572 <td class="left">foot=yes, wheelchair=yes, horse=yes, bicycle=yes
574 <td class="left">restricted_byway
575 <td class="left">foot=yes, wheelchair=yes, horse=yes, bicycle=yes
577 <td class="left">byway
578 <td class="left">foot=yes, wheelchair=yes, horse=yes, bicycle=yes, moped=yes, motorbike=yes, motorcar=yes
580 <td class="left">footpath or public_footpath
581 <td class="left">foot=yes, wheelchair=yes
585 <h4><a name="H_1_3_2_4" title="Specific access"></a>Specific Access Permissions</h4>
587 The final part of the access permissions is to use the specific transport type
592 One tag is recognised for each of the different modes of transport: <em>foot</em>,
593 <em>horse</em>, <em>bicycle</em>, <em>wheelchair</em>, <em>moped</em>,
594 <em>motorbike</em>, <em>motorcar</em>, <em>goods</em>, <em>hgv</em>
595 and <em>psv</em>. These indicate whether the specific type of transport is
596 allowed on the highway or not.
599 <h4><a name="H_1_3_2_5" title="Properties"></a>Highway Properties</h4>
601 If there is a surface tag then the highway is assumed to be unpaved unless the
602 tag value matches one of the following: <em>paved</em>, <em>asphalt</em>
603 or <em>concrete</em>.
607 Support for the obsolete <em>paved</em> tag is also provided and the highway is
608 paved if this is set to a true value.
612 The <em>lanes</em> tag is used to identify whether a highway has multiple lanes
613 for traffic or not (the number of lanes is not important in this case, only
614 whether it is more than one) this sets one of the highway properties.
618 The <em>bridge</em> and <em>tunnel</em> tags are copied directly from the input
622 <h4><a name="H_1_3_2_6" title="Restrictions"></a>Highway Restrictions</h4>
624 The <em>oneway</em>, <em>maxspeed</em>, <em>maxweight</em>, <em>maxheight</em>,
625 <em>maxwidth</em> and <em>maxlength</em> are copied directly from the input to
626 the output without modification.
629 <h4><a name="H_1_3_2_7" title="Names and Refs"></a>Highway Names and References</h4>
631 The <em>name</em> and <em>ref</em> tags are copied directly from the input to
635 <h3><a name="H_1_3_3" title="Relations"></a>Relation Tag Transformations</h3>
637 No transformations are applicable since no relation tags are recognised.
643 <!-- Footer Start -->
645 <div class="footer" align="center">
649 © Andrew M. Bishop = <amb "at" gedanken.demon.co.uk>