/usr/share/routino/www/documentation/configuration.html is in routino-www 2.4.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<!--
Routino documentation - configuration
Part of the Routino routing software.
This file Copyright 2008-2011 Andrew M. Bishop
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see http://www.gnu.org/licenses/.
-->
<HEAD>
<TITLE>Routino : Configuration</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<LINK href="style.css" type="text/css" rel="stylesheet">
</HEAD>
<BODY>
<!-- Header Start -->
<div class="header" align="center">
<h1>Routino : Configuration</h1>
<hr>
</div>
<!-- Header End -->
<!-- Content Start -->
<div class="content">
<h2><a name="H_1_1"></a>XML Configuration Files</h2>
New in version 1.4 of Routino is the use of configuration files to allow more
information to be provided to the programs at run-time. The configuration files
that are used are:
<ul>
<li>Tagging transformation rules for the <em>planetsplitter</em> program.
<li>Routing profiles for the <em>router</em> program.
<li>Output translations for the <em>router</em> program.
</ul>
In keeping with the nature of the input and output files the configuration files
are also XML files. Each of the files uses a custom defined XML schema and an
XSD file is provided for each of them.
<h3><a name="H_1_1_1" title="Tagging rules"></a>Tag Transformation Rules</h3>
The default name of the tagging transformation rules XML configuration file
is <em>tagging.xml</em> in the same directory as the generated database files.
Other filenames can be specified on the command line using
the <tt>--tagging</tt> option. When processing the input it is possible to have
a different set of tagging rules for each file; for example different rules for
different countries.
<p>
The tagging rules allow modifying the highway tags in the source file so that
the routing can be performed on a simpler set of tags. This removes the special
case tagging rules from the source code into the configuration file where they
can be easily modified. Part of the provided tagging.xml file showing the rules
for motorway_link and motorway highway types.
<pre class="boxed">
<?xml version="1.0" encoding="utf-8"?>
<routino-tagging>
<way>
<if k="highway" v="motorway_link">
<set v="motorway"/>
</if>
<if k="highway" v="motorway">
<output k="highway"/>
<output k="motorbike" v="yes"/>
<output k="motorcar" v="yes"/>
<output k="goods" v="yes"/>
<output k="hgv" v="yes"/>
<output k="psv" v="yes"/>
<output k="paved" v="yes"/>
<output k="multilane" v="yes"/>
<output k="oneway" v="yes"/>
</if>
...
<way>
</routino-tagging>
</pre>
The rules all have the same format; an <em>if</em> element for matching the
input and some <em>set</em> or <em>output</em> elements to either change the
input tags or create an output tag. The <em>k</em> and <em>v</em> attributes
have the same meaning as the attributes with the same names in the OSM XML file
- the tag key and tag value.
<p>
An <em>if</em> rule that has both <em>k</em> and <em>v</em> specified is only
applied if a tag exists in the input that matches both. An <em>if</em> rule
that has only the <em>k</em> attribute is applied if a tag with that key exists
and an <em>if</em> rule that has only the <em>v</em> attribute is applied to all
tags with that value.
<p>
For the <em>set</em> and <em>output</em> elements the tag that is created in the
input or output tag set uses the <em>k</em> and <em>v</em> attributes specified.
If one or both are not specified then the original ones are used.
<h3><a name="H_1_1_2" title="Profiles"></a>Routing Profiles</h3>
The default name of the routing profiles XML configuration file
is <em>profiles.xml</em> in the same directory as the database files. Other
filenames can be specified on the command line using the <tt>--tagging</tt>
option.
<p>
The purpose of this configuration file is to allow easy modification of the
routing parameters so that they do not all need to be specified on the command
line. In versions of Routino before version 1.4 the default routing parameters
(preferred highways, preferred speeds etc) were contained in the source code,
now they are in a configuration file. When calculating a route
the <tt>--profile</tt> option selects the named profile from the configuration
file.
<p>
Part of the provided profiles.xml file showing the parameters for transport on
foot is shown below:
<pre class="boxed">
<?xml version="1.0" encoding="UTF-8" ?>
<routino-profiles>
<profile name="foot" transport="foot">
<speeds>
...
<speed highway="cycleway" kph="4" />
<speed highway="path" kph="4" />
<speed highway="steps" kph="4" />
</speeds>
<preferences>
...
<preference highway="cycleway" percent="95" />
<preference highway="path" percent="100" />
<preference highway="steps" percent="80" />
</preferences>
<properties>
<property type="paved" percent="50" />
<property type="multilane" percent="25" />
<property type="bridge" percent="50" />
<property type="tunnel" percent="50" />
...
</properties>
<restrictions>
<oneway obey="0" />
<weight limit="0.0" />
<height limit="0.0" />
<width limit="0.0" />
<length limit="0.0" />
</restrictions>
</profile>
<profile name="horse" transport="horse">
...
</profile>
...
</routino-profiles>
</pre>
<h3><a name="H_1_1_3" title="Translations"></a>Output Translations</h3>
The default name of the output translations XML configuration file
is <em>translations.xml</em> in the same directory as the database files. Other
filenames can be specified on the command line using the <tt>--translations</tt>
option.
<p>
The generated HTML and GPX output files (described in the next section) are
created using the fragments of text that are defined in this file. Additional
languages can be added to the file and are selected using
the <tt>--language</tt> option to the router. If no language is specified the
first one in the file is used.
<p>
Part of the provided translations.xml file showing some of the English language
(en) translations is shown below:
<pre class="boxed">
<?xml version="1.0" encoding="utf-8"?>
<routino-translations>
<language lang="en">
...
<turn direction="-4" string="Very sharp left" />
<turn direction="-3" string="Sharp left" />
<turn direction="-2" string="Left" />
...
<heading direction="-4" string="South" />
<heading direction="-3" string="South-West" />
<heading direction="-2" string="West" />
...
<route type="shortest" string="Shortest" />
<route type="quickest" string="Quickest" />
<output-html>
...
</output-html>
<output-gpx>
...
</output-gpx>
</language>
</routino-translations>
</pre>
</div>
<!-- Content End -->
<!-- Footer Start -->
<div class="footer" align="center">
<hr>
<address>
© Andrew M. Bishop = <amb "at" gedanken.demon.co.uk>
</address>
</div>
<!-- Footer End -->
</BODY>
</HTML>
|