1 Routino : Configuration
2 =======================
5 New in version 1.4 of Routino is the use of configuration files to
6 allow more information to be provided to the programs at run-time. The
7 configuration files that are used are:
8 * Tagging transformation rules for the planetsplitter program.
9 * Routing profiles for the router program.
10 * Output translations for the router program.
12 In keeping with the nature of the input and output files the
13 configuration files are also XML files. Each of the files uses a custom
14 defined XML schema and an XSD file is provided for each of them.
17 Tag Transformation Rules
18 ------------------------
20 The default name of the tagging transformation rules XML configuration
21 file is tagging.xml in the same directory as the generated database
22 files. Other filenames can be specified on the command line using the
23 --tagging option. When processing the input it is possible to have a
24 different set of tagging rules for each file; for example different
25 rules for different countries.
27 The tagging rules allow modifying the highway tags in the source file
28 so that the routing can be performed on a simpler set of tags. This
29 removes the special case tagging rules from the source code into the
30 configuration file where they can be easily modified. Part of the
31 provided tagging.xml file showing the rules for motorway_link and
32 motorway highway types.
34 <?xml version="1.0" encoding="utf-8"?>
39 <if k="highway" v="motorway_link">
43 <if k="highway" v="motorway">
46 <output k="motorbike" v="yes"/>
47 <output k="motorcar" v="yes"/>
48 <output k="goods" v="yes"/>
49 <output k="hgv" v="yes"/>
50 <output k="psv" v="yes"/>
52 <output k="paved" v="yes"/>
53 <output k="multilane" v="yes"/>
54 <output k="oneway" v="yes"/>
61 The rules all have the same format; an if element for matching the
62 input and some set or output elements to either change the input tags
63 or create an output tag. The k and v attributes have the same meaning
64 as the attributes with the same names in the OSM XML file - the tag key
67 An if rule that has both k and v specified is only applied if a tag
68 exists in the input that matches both. An if rule that has only the k
69 attribute is applied if a tag with that key exists and an if rule that
70 has only the v attribute is applied to all tags with that value.
72 For the set and output elements the tag that is created in the input or
73 output tag set uses the k and v attributes specified. If one or both
74 are not specified then the original ones are used.
80 The default name of the routing profiles XML configuration file is
81 profiles.xml in the same directory as the database files. Other
82 filenames can be specified on the command line using the --tagging
85 The purpose of this configuration file is to allow easy modification of
86 the routing parameters so that they do not all need to be specified on
87 the command line. In versions of Routino before version 1.4 the default
88 routing parameters (preferred highways, preferred speeds etc) were
89 contained in the source code, now they are in a configuration file.
90 When calculating a route the --profile option selects the named profile
91 from the configuration file.
93 Part of the provided profiles.xml file showing the parameters for
94 transport on foot is shown below:
96 <?xml version="1.0" encoding="UTF-8" ?>
99 <profile name="foot" transport="foot">
102 <speed highway="cycleway" kph="4" />
103 <speed highway="path" kph="4" />
104 <speed highway="steps" kph="4" />
108 <preference highway="cycleway" percent="95" />
109 <preference highway="path" percent="100" />
110 <preference highway="steps" percent="80" />
113 <property type="paved" percent="50" />
114 <property type="multilane" percent="25" />
115 <property type="bridge" percent="50" />
116 <property type="tunnel" percent="50" />
117 <property type="footroute" percent="55" />
118 <property type="bicycleroute" percent="55" />
122 <weight limit="0.0" />
123 <height limit="0.0" />
124 <width limit="0.0" />
125 <length limit="0.0" />
128 <profile name="horse" transport="horse">
138 The default name of the output translations XML configuration file is
139 translations.xml in the same directory as the database files. Other
140 filenames can be specified on the command line using the --translations
143 The generated HTML and GPX output files (described in the next section)
144 are created using the fragments of text that are defined in this file.
145 Additional languages can be added to the file and are selected using
146 the --language option to the router. If no language is specified the
147 first one in the file is used.
149 Part of the provided translations.xml file showing some of the English
150 language (en) translations is shown below:
152 <?xml version="1.0" encoding="utf-8"?>
153 <routino-translations>
157 <turn direction="-4" string="Very sharp left" />
158 <turn direction="-3" string="Sharp left" />
159 <turn direction="-2" string="Left" />
161 <heading direction="-4" string="South" />
162 <heading direction="-3" string="South-West" />
163 <heading direction="-2" string="West" />
165 <route type="shortest" string="Shortest" />
166 <route type="quickest" string="Quickest" />
174 </routino-translations>
179 Copyright 2010 Andrew M. Bishop.