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 The node attributes <em>id</em>, <em>latitude</em> and <em>longitude</em> are
79 used. The id atribute is required to associate the node with the ways and the
80 position attributes are required to locate the node.
83 <h4><a name="H_1_2_1_1" title="transport tags"></a>Transport Specific Tags</h4>
85 One tag is recognised for each of the different modes of transport: <em>foot</em>,
86 <em>horse</em>, <em>bicycle</em>, <em>wheelchair</em>, <em>moped</em>,
87 <em>motorbike</em>, <em>motorcar</em>, <em>goods</em>, <em>hgv</em>
88 and <em>psv</em>. These indicate whether the specific type of transport is
89 allowed to pass through the node or not.
93 By default for nodes all types of transport are allowed to pass through a node
94 and specific tags must be used to remove the permissions for the transport.
97 <h3><a name="H_1_2_2" title="Ways"></a>Way Tags And Attributes</h3>
99 The tags from the ways in the data are the ones that provide most of the
100 information for routing. The <em>id</em> attribute is used only so that the
101 many segments associated with a way can be share a set of tags taken from the
105 <h4><a name="H_1_2_2_1" title="highway"></a>The highway Tag</h4>
107 The most important tag that is used from a way is the <em>highway</em> tag.
108 This defines the type of highway that the way represents. Any way that does not
109 have a highway tag is discarded.
113 There are more highway types defined than are used by the router. The subset
114 that the router uses are:
134 Note 1: This changed in version 1.3 of Routino - the bridleway and footway
135 types were included within the path highway type.
137 Note 2: This changed in version 1.3 of Routino - the steps type was separated
138 from the footway type.
142 <h4><a name="H_1_2_2_2" title="transport tags"></a>Transport Specific Tags</h4>
144 One tag is recognised for each of the different modes of transport: <em>foot</em>,
145 <em>horse</em>, <em>bicycle</em>, <em>wheelchair</em>, <em>moped</em>,
146 <em>motorbike</em>, <em>motorcar</em>, <em>goods</em>, <em>hgv</em>
147 and <em>psv</em>. These indicate whether the specific type of transport is
148 allowed on the highway or not.
152 By default for ways no types of transport are allowed to pass along a highway
153 and specific tags must be used to add the permissions for the transport.
156 <h4><a name="H_1_2_2_3" title="name"></a>The name Tag</h4>
158 The <em>name</em> tag is used to provide the label for the highway when printing
162 <h4><a name="H_1_2_2_4" title="ref"></a>The ref Tag</h4>
164 The <em>ref</em> tag is used to provide the label for the highway when printing
168 <h4><a name="H_1_2_2_5" title="junction"></a>The junction Tag</h4>
170 The <em>junction</em> tag is used to check if a highway is (part of) a
171 roundabout. This tag is used for information to label the highway if no other
175 <h4><a name="H_1_2_2_6" title="multilane"></a>The multilane Tag</h4>
177 The <em>multilane</em> tag is used to identify whether a highway has multiple
178 lanes for traffic and this sets one of the highway properties. There is not
179 normally a <em>multilane</em> tag but one needs to be added by the tag
180 processing transformations. Values of <em>true</em>, <em>yes</em>, <em>1</em>
184 <h4><a name="H_1_2_2_7" title="paved"></a>The paved Tag</h4>
186 The <em>paved</em> tag is used to identify whether a highway is paved or not,
187 this is one of the available highway properties. A <em>paved</em> tag may exist
188 in the original data but normally the <em>surface</em> tag needs to be
189 transformed into the paved tag.
192 <h4><a name="H_1_2_2_8" title="bridge"></a>The bridge Tag</h4>
194 The <em>bridge</em> tag is used to identify whether a highway is a bridge and
195 therefore set one of the available properties.
198 <h4><a name="H_1_2_2_9" title="tunnel"></a>The tunnel Tag</h4>
200 The <em>tunnel</em> tag is used to identify whether a highway is a tunnel and
201 therefore set one of the available properties.
204 <h4><a name="H_1_2_2_10" title="footroute"></a>The footroute Tag</h4>
206 The <em>footroute</em> tag is used to identify whether a highway is part of a
207 walking route and therefore set one of the available properties. This is not a
208 standard OSM tag and is normally added to the individual highways by looking for
209 route relations that are designated for foot access.
212 <h4><a name="H_1_2_2_11" title="bicycleroute"></a>The bicycleroute Tag</h4>
214 The <em>bicycleroute</em> tag is used to identify whether a highway is part of a
215 bicycle route and therefore set one of the available properties. This is not a
216 standard OSM tag and is normally added to the individual highways by looking for
217 route relations that are designated for bicycle access.
220 <h4><a name="H_1_2_2_12" title="oneway"></a>The oneway Tag</h4>
222 The <em>oneway</em> tag is used to specify that traffic is only allowed to
223 travel in one direction.
226 <h4><a name="H_1_2_2_13" title="maxspeed"></a>The maxspeed Tag</h4>
228 The <em>maxspeed</em> tag is used to specify the maximum speed limit on the
229 highway; this is always measured in km/hr in OpenStreetMap data. If the tag
230 value contains "mph" then it is assumed to be a value in those units and
234 <h4><a name="H_1_2_2_14" title="maxweight"></a>The maxweight Tag</h4>
236 The <em>maxweight</em> tag is used to specify the maximum weight of any traffic
237 on the highway. In other words this must be set to the heaviest weight allowed
238 on the highway (for example a bridge) in tonnes. If the tag value contains "kg"
239 then it is assumed that the value is in these units and converted to tonnes.
242 <h4><a name="H_1_2_2_15" title="maxheight"></a>The maxheight Tag</h4>
244 The <em>maxheight</em> tag is used to specify the maximum height of any traffic
245 on the highway. In other words this must be set to the lowest height of
246 anything above the highway (like a bridge) in metres. If the tag value contains
247 a measurement in feet or feet and inches then attempts are made to convert this
251 <h4><a name="H_1_2_2_16" title="maxwidth"></a>The maxwidth Tag</h4>
253 The <em>maxwidth</em> tag is used to specify the maximum width of any traffic on
254 the highway. This must be set to the minimum width of the contraints at the
255 wayside in metres. If the tag value contains a measurement in feet or feet and
256 inches then attempts are made to convert this to metres.
259 <h4><a name="H_1_2_2_17" title="maxlength"></a>The maxlength Tag</h4>
261 The <em>maxlength</em> tag is used to specify the maximum length of any traffic
262 on the highway (usually from a traffic sign) in metres. If the tag value
263 contains a measurement in feet or feet and inches then attempts are made to
264 convert this to metres.
267 <h3><a name="H_1_2_3" title="Relations"></a>Relation Tags And Attributes</h3>
269 The tags from the relations are used to associate more properties with the
270 highways that are part of that relation. The <em>id</em> attribute is used so
271 that relations that are members of other relations can be identified.
274 <h4><a name="H_1_2_3_1" title="footroute"></a>The footroute Tag</h4>
276 The <em>footroute</em> tag is used to identify whether a relation defines a
277 walking route and therefore should be applied to the individual member highways.
280 <h4><a name="H_1_2_3_2" title="bicycleroute"></a>The bicycleroute Tag</h4>
282 The <em>bicycleroute</em> tag is used to identify whether a relation defines a
283 bicycle route and therefore should be applied to the individual member highways.
286 <h2><a name="H_1_3" title="Tag Transformations"></a>Tag Transformations</h2>
288 This section describes the set of tag transformations that are contained in the
289 default configuration file. The configuration file tagging rules are applied in
290 sequence and this section of the document is arranged in the same order.
293 <h3><a name="H_1_3_1" title="Nodes"></a>Node Tag Transformations</h3>
295 <h4><a name="H_1_3_1_1" title="Barrier Defaults"></a>Barrier Defaults</h4>
297 The first part of the tag transformations is to decide on defaults for each type
298 of node. This uses the <em>barrier</em> tag in the OSM file and converts it into
299 a default set of disallowed transport types.
304 <caption>Transport types through different barrier types</caption>
306 <th class="left">Barrier
307 <th class="center">foot
308 <th class="center">horse
309 <th class="center">bicycle
310 <th class="center">wheelchair
311 <th class="center">moped
312 <th class="center">motorbike
313 <th class="center">motorcar
314 <th class="center">goods
315 <th class="center">hgv
316 <th class="center">psv
318 <td class="left">bollard
319 <td class="center">yes
320 <td class="center">yes
321 <td class="center">yes
322 <td class="center">yes
323 <td class="center">yes
324 <td class="center">yes
325 <td class="center">no
326 <td class="center">no
327 <td class="center">no
328 <td class="center">no
330 <td class="left">kissing_gate
331 <td class="center">yes
332 <td class="center">no
333 <td class="center">no
334 <td class="center">no
335 <td class="center">no
336 <td class="center">no
337 <td class="center">no
338 <td class="center">no
339 <td class="center">no
340 <td class="center">no
342 <td class="left">stile
343 <td class="center">yes
344 <td class="center">no
345 <td class="center">no
346 <td class="center">no
347 <td class="center">no
348 <td class="center">no
349 <td class="center">no
350 <td class="center">no
351 <td class="center">no
352 <td class="center">no
354 <td class="left">turnstile
355 <td class="center">yes
356 <td class="center">no
357 <td class="center">no
358 <td class="center">no
359 <td class="center">no
360 <td class="center">no
361 <td class="center">no
362 <td class="center">no
363 <td class="center">no
364 <td class="center">no
367 <h4><a name="H_1_3_1_2" title="Generic access"></a>Generic Access Permissions</h4>
369 The <em>access</em> tag is used to specify the default access restrictions
370 through the node. If the tag value is <em>no</em> or <em>private</em> then all
371 transport types are denied access (later tag transformation rules may add
372 specific transport types back again).
375 <h4><a name="H_1_3_1_3" title="Other access"></a>Other Access Permissions</h4>
377 A tag named <em>vehicle</em> means any of the <em>bicycle</em>, <em>moped</em>,
378 <em>motorbike</em>, <em>motorcar</em>, <em>goods</em>, <em>hgv</em>
379 and <em>psv</em> transport types. A tag named <em>motor_vehicle</em> is
380 transformed to mean any vehicle except a <em>bicycle</em>.
383 <h4><a name="H_1_3_1_4" title="Specific access"></a>Specific Access Permissions</h4>
385 The final part of the access permissions is to use the specific transport type
390 One tag is recognised for each of the different modes of transport: <em>foot</em>,
391 <em>horse</em>, <em>bicycle</em>, <em>wheelchair</em>, <em>moped</em>,
392 <em>motorbike</em>, <em>motorcar</em>, <em>goods</em>, <em>hgv</em>
393 and <em>psv</em>. These indicate whether the specific type of transport is
394 allowed through the node or not.
397 <h3><a name="H_1_3_2" title="Ways"></a>Way Tag Transformations</h3>
400 <h4><a name="H_1_3_2_1" title="Highway Defaults"></a>Highway Defaults</h4>
402 The first part of the tag transformations is to decide on defaults for each type
403 of highway. This uses the <em>highway</em> tag in the OSM file and maps it into
404 one of the <em>highway</em> tags that are recognised by Routino, defining the
405 default allowed transport types and adding a number of properties.
409 The first part of the transformation is to convert the highway tag into one that
410 is recognised by Routino.
415 <caption>Mapping of equivalent highway types</caption>
417 <th class="left">Original tag
418 <th class="left">Transformed tag
420 <td class="left">bridleway
421 <td class="left">path
423 <td class="left">byway
424 <td class="left">track
426 <td class="left">footway
427 <td class="left">path
429 <td class="left">living_street
430 <td class="left">residential
432 <td class="left">minor
433 <td class="left">unclassified
435 <td class="left">pedestrian
436 <td class="left">path
438 <td class="left">road
439 <td class="left">unclassified
441 <td class="left">services
442 <td class="left">service
444 <td class="left">unsurfaced
445 <td class="left">track
447 <td class="left">unpaved
448 <td class="left">track
450 <td class="left">walkway
451 <td class="left">path
456 The type of highway also determines the defaults for the types of transport
457 allowed on the highway. The default assumptions are as shown in the table
463 <caption>Transport types on different highway types</caption>
465 <th class="left">Highway
466 <th class="center">foot
467 <th class="center">horse
468 <th class="center">bicycle
469 <th class="center">wheelchair
470 <th class="center">moped
471 <th class="center">motorbike
472 <th class="center">motorcar
473 <th class="center">goods
474 <th class="center">hgv
475 <th class="center">psv
477 <td class="left">motorway
478 <td class="center">no
479 <td class="center">no
480 <td class="center">no
481 <td class="center">no
482 <td class="center">no
483 <td class="center">yes
484 <td class="center">yes
485 <td class="center">yes
486 <td class="center">yes
487 <td class="center">yes
489 <td class="left">trunk
490 <td class="center">no
491 <td class="center">no
492 <td class="center">no
493 <td class="center">yes
494 <td class="center">yes
495 <td class="center">yes
496 <td class="center">yes
497 <td class="center">yes
498 <td class="center">yes
499 <td class="center">yes
501 <td class="left">primary
502 <td class="center">yes
503 <td class="center">yes
504 <td class="center">yes
505 <td class="center">yes
506 <td class="center">yes
507 <td class="center">yes
508 <td class="center">yes
509 <td class="center">yes
510 <td class="center">yes
511 <td class="center">yes
513 <td class="left">secondary
514 <td class="center">yes
515 <td class="center">yes
516 <td class="center">yes
517 <td class="center">yes
518 <td class="center">yes
519 <td class="center">yes
520 <td class="center">yes
521 <td class="center">yes
522 <td class="center">yes
523 <td class="center">yes
525 <td class="left">tertiary
526 <td class="center">yes
527 <td class="center">yes
528 <td class="center">yes
529 <td class="center">yes
530 <td class="center">yes
531 <td class="center">yes
532 <td class="center">yes
533 <td class="center">yes
534 <td class="center">yes
535 <td class="center">yes
537 <td class="left">unclassified
538 <td class="center">yes
539 <td class="center">yes
540 <td class="center">yes
541 <td class="center">yes
542 <td class="center">yes
543 <td class="center">yes
544 <td class="center">yes
545 <td class="center">yes
546 <td class="center">yes
547 <td class="center">yes
549 <td class="left">residential
550 <td class="center">yes
551 <td class="center">yes
552 <td class="center">yes
553 <td class="center">yes
554 <td class="center">yes
555 <td class="center">yes
556 <td class="center">yes
557 <td class="center">yes
558 <td class="center">yes
559 <td class="center">yes
561 <td class="left">service
562 <td class="center">yes
563 <td class="center">yes
564 <td class="center">yes
565 <td class="center">yes
566 <td class="center">yes
567 <td class="center">yes
568 <td class="center">yes
569 <td class="center">yes
570 <td class="center">yes
571 <td class="center">yes
573 <td class="left">track
574 <td class="center">yes
575 <td class="center">yes
576 <td class="center">yes
577 <td class="center">yes
578 <td class="center">no
579 <td class="center">no
580 <td class="center">no
581 <td class="center">no
582 <td class="center">no
583 <td class="center">no
585 <td class="left">cycleway
586 <td class="center">yes
587 <td class="center">no
588 <td class="center">yes
589 <td class="center">yes
590 <td class="center">no
591 <td class="center">no
592 <td class="center">no
593 <td class="center">no
594 <td class="center">no
595 <td class="center">no
597 <td class="left">path
598 <td class="center">yes
599 <td class="center">yes (1)
600 <td class="center">yes
601 <td class="center">yes (1)
602 <td class="center">no
603 <td class="center">no
604 <td class="center">no
605 <td class="center">no
606 <td class="center">no
607 <td class="center">no
609 <td class="left">steps
610 <td class="center">yes
611 <td class="center">no
612 <td class="center">no
613 <td class="center">no
614 <td class="center">no
615 <td class="center">no
616 <td class="center">no
617 <td class="center">no
618 <td class="center">no
619 <td class="center">no
625 Note 1: A path allows bicycle or horse access by default only if actually
626 labelled as a highway of type "bridleway" or certain values of
627 the <em>designation</em> tag (described below).
632 Finally for the highway tag a number of properties are added depending on the
638 <caption>Properties on different highway types</caption>
640 <th class="center">Highway
641 <th class="center">Properties
643 <td class="center">motorway
644 <td class="center">paved, oneway, multilane
646 <td class="center">trunk
647 <td class="center">paved
649 <td class="center">primary
650 <td class="center">paved
652 <td class="center">secondary
653 <td class="center">paved
655 <td class="center">tertiary
656 <td class="center">paved
658 <td class="center">unclassified
659 <td class="center">paved
661 <td class="center">residential
662 <td class="center">paved
664 <td class="center">service
665 <td class="center">paved
667 <td class="center">track
668 <td class="center">paved (1)
670 <td class="center">cycleway
671 <td class="center">paved
673 <td class="center">path
674 <td class="center">paved (2)
676 <td class="center">steps
683 Note 1: A track is paved only if it is tagged as tracktype=grade1.
685 Note 2: A path is paved only if it was originally tagged as highway=walkway or
690 <h4><a name="H_1_3_2_2" title="Generic access"></a>Generic Access Permissions</h4>
692 The <em>access</em> tag is used to specify the default access restrictions on
693 the highway. If the tag value is "no" or "private" then all transport types are
694 denied access (later tag transformation rules may add specific transport types
698 <h4><a name="H_1_3_2_3" title="Other access"></a>Other Access Permissions</h4>
700 A tag named <em>vehicle</em> means any of the <em>bicycle</em>, <em>moped</em>,
701 <em>motorbike</em>, <em>motorcar</em>, <em>goods</em>, <em>hgv</em>
702 and <em>psv</em> transport types. A tag named <em>motor_vehicle</em> is
703 transformed to mean any vehicle except a <em>bicycle</em>.
707 The <em>designation</em> tag is used as an alternative method of identifying the
708 legal right of way on a path (in the UK at least). The tag transformations
709 convert these tags into a set of allowed transport types as shown below.
714 <caption>Aliasing of designation types</caption>
716 <th class="left">Designation tag
717 <th class="left">Equivalent access permissions
719 <td class="left">bridleway or public_bridleway
720 <td class="left">foot=yes, wheelchair=yes, horse=yes, bicycle=yes
722 <td class="left">restricted_byway
723 <td class="left">foot=yes, wheelchair=yes, horse=yes, bicycle=yes
725 <td class="left">byway
726 <td class="left">foot=yes, wheelchair=yes, horse=yes, bicycle=yes, moped=yes, motorbike=yes, motorcar=yes
728 <td class="left">footpath or public_footpath
729 <td class="left">foot=yes, wheelchair=yes
733 <h4><a name="H_1_3_2_4" title="Specific access"></a>Specific Access Permissions</h4>
735 The final part of the access permissions is to use the specific transport type
740 One tag is recognised for each of the different modes of transport: <em>foot</em>,
741 <em>horse</em>, <em>bicycle</em>, <em>wheelchair</em>, <em>moped</em>,
742 <em>motorbike</em>, <em>motorcar</em>, <em>goods</em>, <em>hgv</em>
743 and <em>psv</em>. These indicate whether the specific type of transport is
744 allowed on the highway or not.
747 <h4><a name="H_1_3_2_5" title="Properties"></a>Highway Properties</h4>
749 If there is a surface tag then the highway is assumed to be unpaved unless the
750 tag value matches one of the following: <em>paved</em>, <em>asphalt</em>
751 or <em>concrete</em>.
755 Support for the obsolete <em>paved</em> tag is also provided and the highway is
756 paved if this is set to a true value.
760 The <em>lanes</em> tag is used to identify whether a highway has multiple lanes
761 for traffic or not (the number of lanes is not important in this case, only
762 whether it is more than one) this sets one of the highway properties.
766 The <em>bridge</em> and <em>tunnel</em> tags are copied directly from the input
770 <h4><a name="H_1_3_2_6" title="Restrictions"></a>Highway Restrictions</h4>
772 The <em>oneway</em>, <em>maxspeed</em>, <em>maxweight</em>, <em>maxheight</em>,
773 <em>maxwidth</em> and <em>maxlength</em> are copied directly from the input to
774 the output without modification.
777 <h4><a name="H_1_3_2_7" title="Names and Refs"></a>Highway Names and References</h4>
779 The <em>name</em> and <em>ref</em> tags are copied directly from the input to
783 <h3><a name="H_1_3_3" title="Relations"></a>Relation Tag Transformations</h3>
785 <h4><a name="H_1_3_3_1" title="Routes"></a>Routes</h4>
787 The <em>route</em> tag can be used to determine whether a relation is part of a
788 walking of bicycle route so that the footroute and bicycleroute properties can
789 be applied to the highways that make up that relation.
793 The tag transformations that are applied for route relations are defined in the
799 <caption>Route properties from different route types</caption>
801 <th class="center">Relation Tag
802 <th class="center">footroute Property
803 <th class="center">bicycleroute Property
805 <td class="center">foot
806 <td class="center">yes
807 <td class="center">no
809 <td class="center">walking
810 <td class="center">yes
811 <td class="center">no
813 <td class="center">hiking
814 <td class="center">yes
815 <td class="center">no
817 <td class="center">bicycle
818 <td class="center">no
819 <td class="center">yes
821 <td class="center">bicycle;foot or foot;bicycle
822 <td class="center">yes
823 <td class="center">yes
830 <!-- Footer Start -->
832 <div class="footer" align="center">
836 © Andrew M. Bishop = <amb "at" gedanken.demon.co.uk>