1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5 Routino documentation - configuration
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 : Configuration</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 : Configuration</h1>
44 <!-- Content Start -->
48 <h2><a name="H_1_1"></a>XML Configuration Files</h2>
50 New in version 1.4 of Routino is the use of configuration files to allow more
51 information to be provided to the programs at run-time. The configuration files
54 <li>Tagging transformation rules for the <em>planetsplitter</em> program.
55 <li>Routing profiles for the <em>router</em> program.
56 <li>Output translations for the <em>router</em> program.
59 In keeping with the nature of the input and output files the configuration files
60 are also XML files. Each of the files uses a custom defined XML schema and an
61 XSD file is provided for each of them.
63 <h3><a name="H_1_1_1" title="Tagging rules"></a>Tag Transformation Rules</h3>
65 The default name of the tagging transformation rules XML configuration file
66 is <em>tagging.xml</em> in the same directory as the generated database files.
67 Other filenames can be specified on the command line using
68 the <tt>--tagging</tt> option. When processing the input it is possible to have
69 a different set of tagging rules for each file; for example different rules for
74 The tagging rules allow modifying the highway tags in the source file so that
75 the routing can be performed on a simpler set of tags. This removes the special
76 case tagging rules from the source code into the configuration file where they
77 can be easily modified. Part of the provided tagging.xml file showing the rules
78 for motorway_link and motorway highway types.
81 <?xml version="1.0" encoding="utf-8"?>
82 <routino-tagging>
86 <if k="highway" v="motorway_link">
87 <set v="motorway"/>
90 <if k="highway" v="motorway">
91 <output k="highway"/>
93 <output k="motorbike" v="yes"/>
94 <output k="motorcar" v="yes"/>
95 <output k="goods" v="yes"/>
96 <output k="hgv" v="yes"/>
97 <output k="psv" v="yes"/>
99 <output k="paved" v="yes"/>
100 <output k="multilane" v="yes"/>
101 <output k="oneway" v="yes"/>
106 </routino-tagging>
109 The rules all have the same format; an <em>if</em> element for matching the
110 input and some <em>set</em> or <em>output</em> elements to either change the
111 input tags or create an output tag. The <em>k</em> and <em>v</em> attributes
112 have the same meaning as the attributes with the same names in the OSM XML file
113 - the tag key and tag value.
117 An <em>if</em> rule that has both <em>k</em> and <em>v</em> specified is only
118 applied if a tag exists in the input that matches both. An <em>if</em> rule
119 that has only the <em>k</em> attribute is applied if a tag with that key exists
120 and an <em>if</em> rule that has only the <em>v</em> attribute is applied to all
121 tags with that value.
125 For the <em>set</em> and <em>output</em> elements the tag that is created in the
126 input or output tag set uses the <em>k</em> and <em>v</em> attributes specified.
127 If one or both are not specified then the original ones are used.
130 <h3><a name="H_1_1_2" title="Profiles"></a>Routing Profiles</h3>
132 The default name of the routing profiles XML configuration file
133 is <em>profiles.xml</em> in the same directory as the database files. Other
134 filenames can be specified on the command line using the <tt>--tagging</tt>
139 The purpose of this configuration file is to allow easy modification of the
140 routing parameters so that they do not all need to be specified on the command
141 line. In versions of Routino before version 1.4 the default routing parameters
142 (preferred highways, preferred speeds etc) were contained in the source code,
143 now they are in a configuration file. When calculating a route
144 the <tt>--profile</tt> option selects the named profile from the configuration
149 Part of the provided profiles.xml file showing the parameters for transport on
153 <?xml version="1.0" encoding="UTF-8" ?>
154 <routino-profiles>
156 <profile name="foot" transport="foot">
159 <speed highway="cycleway" kph="4" />
160 <speed highway="path" kph="4" />
161 <speed highway="steps" kph="4" />
165 <preference highway="cycleway" percent="95" />
166 <preference highway="path" percent="100" />
167 <preference highway="steps" percent="80" />
170 <property type="paved" percent="50" />
171 <property type="multilane" percent="25" />
172 <property type="bridge" percent="50" />
173 <property type="tunnel" percent="50" />
177 <oneway obey="0" />
178 <weight limit="0.0" />
179 <height limit="0.0" />
180 <width limit="0.0" />
181 <length limit="0.0" />
182 </restrictions>
184 <profile name="horse" transport="horse">
188 </routino-profiles>
192 <h3><a name="H_1_1_3" title="Translations"></a>Output Translations</h3>
194 The default name of the output translations XML configuration file
195 is <em>translations.xml</em> in the same directory as the database files. Other
196 filenames can be specified on the command line using the <tt>--translations</tt>
201 The generated HTML and GPX output files (described in the next section) are
202 created using the fragments of text that are defined in this file. Additional
203 languages can be added to the file and are selected using
204 the <tt>--language</tt> option to the router. If no language is specified the
205 first one in the file is used.
209 Part of the provided translations.xml file showing some of the English language
210 (en) translations is shown below:
213 <?xml version="1.0" encoding="utf-8"?>
214 <routino-translations>
216 <language lang="en">
218 <turn direction="-4" string="Very sharp left" />
219 <turn direction="-3" string="Sharp left" />
220 <turn direction="-2" string="Left" />
222 <heading direction="-4" string="South" />
223 <heading direction="-3" string="South-West" />
224 <heading direction="-2" string="West" />
226 <route type="shortest" string="Shortest" />
227 <route type="quickest" string="Quickest" />
235 </routino-translations>
242 <!-- Footer Start -->
244 <div class="footer" align="center">
248 © Andrew M. Bishop = <amb "at" gedanken.demon.co.uk>