This file is indexed.

/usr/share/routino/www/documentation/configuration.html is in routino-www 3.0-3.

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
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">

<title>Routino : Configuration</title>

<!--
 Routino documentation - configuration

 Part of the Routino routing software.

 This file Copyright 2008-2015 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/.
-->

<link href="style.css" type="text/css" rel="stylesheet">
</head>

<body>

<!-- Header Start -->

<div class="header">

<h1>Routino : Configuration</h1>

</div>

<!-- Header End -->

<!-- Content Start -->

<div class="content">

<h2 id="H_1_1">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 id="H_1_1_1" title="Tagging rules">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">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;routino-tagging&gt;

  &lt;way&gt;

    &lt;if k="highway" v="motorway_link"&gt;
      &lt;set v="motorway"/&gt;
    &lt;/if&gt;

    &lt;if k="highway" v="motorway"&gt;
      &lt;output k="highway"/&gt;

      &lt;output k="motorcycle" v="yes"/&gt;
      &lt;output k="motorcar"   v="yes"/&gt;
      &lt;output k="goods"      v="yes"/&gt;
      &lt;output k="hgv"        v="yes"/&gt;
      &lt;output k="psv"        v="yes"/&gt;

      &lt;output k="paved"      v="yes"/&gt;
      &lt;output k="multilane"  v="yes"/&gt;
      &lt;output k="oneway"     v="yes"/&gt;

      &lt;unset k="highway"/&gt;
    &lt;/if&gt;
...
  &lt;way&gt;

&lt;/routino-tagging&gt;
</pre>

The rules all have the same format; an <em>if</em> or <em>ifnot</em> element at
the top level for matching the input and some other elements inside to be used
if there was a match.

<p>

Within the <em>if</em> and <em>ifnot</em> rules any of the rules can be used.
These are <em>if</em>, <em>ifnot</em>, <em>set</em>, <em>unset</em>,
<em>output</em> or <em>logerror</em> elements.

<p>

The rules for matching the <em>if</em> or <em>ifnot</em> elements are the
following:

<ul>
  <li>An <em>if</em> rule that has both <em>k</em> and <em>v</em> specified is
    only matched if a tag exists in the input that matches both.
  <li>An <em>if</em> rule that has only the <em>k</em> attribute is matched if a
    tag with that key exists.
  <li>An <em>if</em> rule that has only the <em>v</em> attribute is matched for
    each tag with that value (i.e. the contents may be used more than once).
  <li>An <em>if</em> rule that has neither attribute specified always matches.
  <li>An <em>ifnot</em> rule that has both <em>k</em> and <em>v</em> specified
    is only matched if no tag exists in the input that matches both.
  <li>An <em>ifnot</em> rule that has only the <em>k</em> attribute is matched
    only if no tag with that key exists.
  <li>An <em>ifnot</em> rule that has only the <em>v</em> attribute is only
    matched if no tag with that value exists.
  <li>An <em>ifnot</em> rule that has neither attribute specified never matches.
</ul>

<p>

For <em>set</em>, <em>unset</em>, <em>output</em> or <em>logerror</em> elements
inside of an <em>if</em> rule an unspecified value for the <em>k</em>
or <em>v</em> attribute is replaced by the values from the tag that matched the
outer <em>if</em> rule.  This makes it simple to delete tags that match a
particular rule without having to specify the parameters more than once.  For
elements inside of an <em>ifnot</em> element an unspecified value for
the <em>k</em> or <em>v</em> attribute is replaced by the values from the
outer <em>ifnot</em> rule.  This means that either the outer <em>ifnot</em>
element or the inner element must specify both <em>k</em> and <em>v</em>
attributes between them.  For nested <em>if</em> or <em>ifnot</em> elements the
outer <em>k</em> and <em>v</em> attributes are not inherited by the inner
elements.

<p>

The <em>set</em> and <em>unset</em> elements either create or delete a tag from
the input data that was read from the file.  If the <em>set</em> element is used
and the tag already exists then it is modified.  The <em>output</em> element
adds a tag to the set that will be used by Routino to determine the data
properties.

<p>

The <em>logerror</em> element will cause an error message to be added to the
error log file that reports that the key and attribute combination are not
recognised.  If the <em>k</em> attribute is specified but not the <em>v</em>
attribute then the tag value that matches the specified key is looked up and
used.  An additional <em>message</em> attribute can be specified to be printed
at the end of the logged error.

<p>
The default logged error message is:
<pre class="boxed">
Node XXX has an unrecognised tag 'key' = 'value' (in tagging rules); ignoring it.
</pre>

<p>
The specified <em>message</em> attribute will replace the final part of the
logged error.


<h3 id="H_1_1_2" title="Profiles">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">
&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
&lt;routino-profiles&gt;

  &lt;profile name="foot" transport="foot"&gt;
    &lt;speeds&gt;
...
      &lt;speed highway="cycleway"      kph="4" /&gt;
      &lt;speed highway="path"          kph="4" /&gt;
      &lt;speed highway="steps"         kph="4" /&gt;
    &lt;/speeds&gt;
    &lt;preferences&gt;
...
      &lt;preference highway="cycleway"      percent="95" /&gt;
      &lt;preference highway="path"          percent="100" /&gt;
      &lt;preference highway="steps"         percent="80" /&gt;
    &lt;/preferences&gt;
    &lt;properties&gt;
      &lt;property type="paved"        percent="50" /&gt;
      &lt;property type="multilane"    percent="25" /&gt;
      &lt;property type="bridge"       percent="50" /&gt;
      &lt;property type="tunnel"       percent="50" /&gt;
...
    &lt;/properties&gt;
    &lt;restrictions&gt;
      &lt;oneway obey="0" /&gt; 
      &lt;weight limit="0.0" /&gt;
      &lt;height limit="0.0" /&gt;
      &lt;width  limit="0.0" /&gt;
      &lt;length limit="0.0" /&gt;
    &lt;/restrictions&gt;
  &lt;/profile&gt;
  &lt;profile name="horse" transport="horse"&gt;
...
  &lt;/profile&gt;
...
&lt;/routino-profiles&gt;
</pre>


<h3 id="H_1_1_3" title="Translations">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">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;routino-translations&gt;

  &lt;language lang="en"&gt;
...
    &lt;turn direction="-4" string="Very sharp left" /&gt;
    &lt;turn direction="-3" string="Sharp left" /&gt;
    &lt;turn direction="-2" string="Left" /&gt;
...
    &lt;heading direction="-4" string="South" /&gt;
    &lt;heading direction="-3" string="South-West" /&gt;
    &lt;heading direction="-2" string="West" /&gt;
...
    &lt;route type="shortest" string="Shortest" /&gt;
    &lt;route type="quickest" string="Quickest" /&gt;
    &lt;output-html&gt;
...
    &lt;/output-html&gt;
    &lt;output-gpx&gt;
...
    &lt;/output-gpx&gt;
  &lt;/language&gt;
&lt;/routino-translations&gt;
</pre>

</div>

<!-- Content End -->

<!-- Footer Start -->

<div class="footer">

<address>
&copy; Andrew M. Bishop - <a href="http://www.routino.org/">http://www.routino.org/</a>
</address>

</div>

<!-- Footer End -->

</body>

</html>