Routino SVN Repository Browser

Check out the latest version of Routino: svn co http://routino.org/svn/trunk routino

ViewVC logotype

Contents of /trunk/doc/html/usage.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 737 - (show annotations) (download) (as text)
Mon May 30 12:51:08 2011 UTC (13 years, 10 months ago) by amb
File MIME type: text/html
File size: 20799 byte(s)
Run a spelling check on the documentation.

1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <HTML>
3
4 <!--
5 Routino documentation - usage
6
7 Part of the Routino routing software.
8
9 This file Copyright 2008-2011 Andrew M. Bishop
10
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.
15
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.
20
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/.
23 -->
24
25 <HEAD>
26 <TITLE>Routino : Usage</TITLE>
27 <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
28 <LINK href="style.css" type="text/css" rel="stylesheet">
29 </HEAD>
30
31 <BODY>
32
33 <!-- Header Start -->
34
35 <div class="header" align="center">
36
37 <h1>Routino : Usage</h1>
38
39 <hr>
40 </div>
41
42 <!-- Header End -->
43
44 <!-- Content Start -->
45
46 <div class="content">
47
48 <h2><a name="H_1_1"></a>Program Usage</h2>
49
50 There are four programs that make up this software. The first one takes the
51 planet.osm datafile from OpenStreetMap (or other source of data using the same
52 formats) and converts it into a local database. The second program uses the
53 database to determine an optimum route between two points. The third program
54 allows visualisation of the data and statistics to be extracted. The fourth
55 program is a test program for the tag transformations.
56
57 <h3><a name="H_1_1_1"></a>planetsplitter</h3>
58
59 This program reads in the OSM format XML file and splits it up to create the
60 database that is used for routing.
61
62 <pre class="boxed">
63 Usage: planetsplitter [--help]
64 [--dir=&lt;dirname&gt;] [--prefix=&lt;name&gt;]
65 [--sort-ram-size=&lt;size&gt;]
66 [--tmpdir=&lt;dirname&gt;]
67 [--parse-only | --process-only]
68 [--loggable]
69 [--max-iterations=&lt;number&gt;]
70 [--tagging=&lt;filename&gt;]
71 [&lt;filename.osm&gt; ...]
72 </pre>
73
74 <dl>
75 <dt>--help
76 <dd>Prints out the help information.
77 <dt>--dir=&lt;dirname&gt;
78 <dd>Sets the directory name in which to save the results.
79 Defaults to the current directory.
80 <dt>--prefix=&lt;name&gt;
81 <dd>Sets the filename prefix for the files that are created.
82 Defaults to no prefix.
83 <dt>--sort-ram-size=&lt;size&gt;
84 <dd>Specifies the amount of RAM (in MB) to use for sorting the data. If not
85 specified then 64 MB will be used in slim mode or 256 MB otherwise.
86 <dt>--tmpdir=&lt;dirname&gt;
87 <dd>Specifies the name of the directory to store the temporary disk files. If
88 not specified then it defaults to either the value of the --dir option or the
89 current directory.
90 <dt>--parse-only
91 <dd>Parse the input files and store them in a temporary file but don't process
92 the data into a routing database.
93 <dt>--process-only
94 <dd>Don't read in any files but process the existing temporary file into the
95 routing database.
96 <dt>--loggable
97 <dd>Print progress messages that are suitable for logging to a file; normally
98 an incrementing counter is printed which is more suitable for real-time
99 display than logging.
100 <dt>--max-iterations=&lt;number&gt;
101 <dd>The maximum number of iterations to use when generating super-nodes and
102 super-segments. Defaults to 10 which is normally enough.
103 <dt>--tagging=&lt;filename&gt;
104 <dd>Sets the filename containing the list of tagging rules in XML format for
105 the parsing the input files. If the file doesn't exist then dirname, prefix
106 and "profiles.xml" will be combined and used, if that doesn't exist then the
107 file '/usr/local/share/routino/profiles.xml' (or custom installation
108 location) will be used.
109 <dt>&lt;filename.osm&gt; ...
110 <dd>Specifies the filename(s) to read data from, by default data is read from
111 the standard input.
112 </dl>
113
114 <p>
115 <i>Note: In version 1.4 of Routino the --transport, --not-highway and
116 --not-property options have been removed. The same functionality can be
117 achieved by editing the tagging rules file to not output unwanted data.</i>
118
119 <p>
120 <i>Note: In version 1.5 of Routino the --slim option has been removed but at
121 compilation time a separate program called <em>planetsplitter-slim</em> is
122 created that operates in slim mode. In slim mode the temporary files and
123 database files are read as needed rather than being mapped into memory. This
124 allows a database size greater than 2 GB on 32-bit machines or usage with little
125 or no virtual memory (e.g. some virtual machines). The penalty for this is that
126 the program takes about four times as long to run.</i>
127
128 <p>
129 Example usage:
130
131 <pre class="boxed">
132 ./planetsplitter --dir=data --prefix=gb great_britain.osm
133 </pre>
134
135 This will generate the output files 'data/gb-nodes.mem', 'data/gb-segments.mem'
136 and 'data/gb-ways.mem'.
137
138
139 <h3><a name="H_1_1_2"></a>router</h3>
140
141 This program performs the calculation of the optimum routes using the database
142 generated by the planetsplitter program.
143
144 <pre class="boxed">
145 Usage: router [--help | --help-profile | --help-profile-xml |
146 --help-profile-json | --help-profile-perl ]
147 [--dir=&lt;dirname&gt;] [--prefix=&lt;name&gt;]
148 [--profiles=&lt;filename&gt;] [--translations=&lt;filename&gt;]
149 [--exact-nodes-only]
150 [--loggable | --quiet]
151 [--output-html]
152 [--output-gpx-track] [--output-gpx-route]
153 [--output-text] [--output-text-all]
154 [--output-none]
155 [--profile=&lt;name&gt;]
156 [--transport=&lt;transport&gt;]
157 [--shortest | --quickest]
158 --lon1=&lt;longitude&gt; --lat1=&lt;latitude&gt;
159 --lon2=&lt;longitude&gt; --lon2=&lt;latitude&gt;
160 [ ... --lon99=&lt;longitude&gt; --lon99=&lt;latitude&gt;]
161 [--heading=&lt;bearing&gt;]
162 [--highway-&lt;highway&gt;=&lt;preference&gt; ...]
163 [--speed-&lt;highway&gt;=&lt;speed&gt; ...]
164 [--property-&lt;property&gt;=&lt;preference&gt; ...]
165 [--oneway=(0|1)] [--turns=(0|1)]
166 [--weight=&lt;weight&gt;]
167 [--height=&lt;height&gt;] [--width=&lt;width&gt;] [--length=&lt;length&gt;]
168 </pre>
169
170 <dl>
171 <dt>--help
172 <dd>Prints out the help information.
173 <dt>--help-profile
174 <dd>Prints out the selected transport profile (type, speed limits, highway
175 preferences etc.)
176 <dt>--help-profile-xml
177 <dd>Prints out all the loaded profiles as an XML file in the same format that
178 can be loaded in.
179 <dt>--help-profile-json
180 <dd>Prints out all the loaded profiles in JavaScript Object Notation (JSON)
181 format for use in the interactive webpage.
182 <dt>--help-profile-perl
183 <dd>Prints out all the loaded profiles as a Perl object for use in the router
184 CGI.
185 <dt>--dir=&lt;dirname&gt;
186 <dd>Sets the directory name in which to read the local database.
187 Defaults to the current directory.
188 <dt>--prefix=&lt;name&gt;
189 <dd>Sets the filename prefix for the files in the local database.
190 Defaults to no prefix.
191 <dt>--profiles=&lt;filename&gt;
192 <dd>Sets the filename containing the list of routing profiles in XML format.
193 If the file doesn't exist then dirname, prefix and "profiles.xml" will be
194 combined and used, if that doesn't exist then the file
195 '/usr/local/share/routino/profiles.xml' (or custom installation location)
196 will be used.
197 <dt>--translations=&lt;filename&gt;
198 <dd>Sets the filename containing the list of translations in XML format for
199 the output files. If the file doesn't exist then dirname, prefix and
200 "translations.xml" will be combined and used, if that doesn't exist then the
201 file '/usr/local/share/routino/translations.xml' (or custom installation
202 location) will be used.
203 <dt>--exact-nodes-only
204 <dd>When processing the specified latitude and longitude points only select
205 the nearest node instead of finding the nearest point within a segment
206 (quicker but less accurate unless the points are already near nodes).
207 <dt>--loggable
208 <dd>Print progress messages that are suitable for logging to a file; normally
209 an incrementing counter is printed which is more suitable for real-time
210 display than logging.
211 <dt>--quiet
212 <dd>Don't generate any screen output while running (useful for running in a script).
213 <dt>--language=&lt;lang&gt;
214 <dd>Select the language specified from the file of translations. If this
215 option is not given and the file exists then the first language in the file
216 will be used. If this option is not given and no file exists the
217 compiled-in default language (English) will be used.
218 <dt>--output-html
219 <dt>--output-gpx-track
220 <dt>--output-gpx-route
221 <dt>--output-text
222 <dt>--output-text-all
223 <dd>Generate the selected output file formats (HTML, GPX track file, GPX route
224 file, plain text route and/or plain text with all nodes). If no output is
225 specified then all are generated, specifying any automatically disables those
226 not specified.
227 <dt>--output-none
228 <dd>Do not generate any output or read in any translations files.
229 <dt>--profile=&lt;name&gt;
230 <dd>Specifies the name of the profile to use.
231 <dt>--transport=&lt;transport&gt;
232 <dd>Select the type of transport to use, &lt;transport&gt; can be set to:
233 <ul>
234 <li>foot = Foot
235 <li>horse = Horse
236 <li>wheelchair = Wheelchair
237 <li>bicycle = Bicycle
238 <li>moped = Moped (Small motorbike, limited speed)
239 <li>motorbike = Motorbike
240 <li>motorcar = Motorcar
241 <li>goods = Goods (Small lorry, van)
242 <li>hgv = HGV (Heavy Goods Vehicle - large lorry)
243 <li>psv = PSV (Public Service Vehicle - bus, coach)
244 </ul>
245 Defaults to 'motorcar', this option also selects the default profile
246 information if the '--profile' option is not given and a profile matching
247 the transport name is found.
248 <dt>--shortest
249 <dd>Find the shortest route between the waypoints.
250 <dt>--quickest
251 <dd>Find the quickest route between the waypoints.
252 <dt>--lon1=&lt;longitude&gt;, --lat1=&lt;latitude&gt;
253 <dt>--lon2=&lt;longitude&gt;, --lat2=&lt;latitude&gt;
254 <dt>... --lon99=&lt;longitude&gt;, --lat99=&lt;latitude&gt;
255 <dd>The location of the waypoints that make up the start, middle and end
256 points of the route. Up to 99 waypoints can be specified and the route will
257 pass through each of the specified ones in sequence. The algorithm will use
258 the closest node or point within a segment that allows the specified traffic
259 type.
260 <dt>--heading=&lt;bearing&gt;
261 <dd>Specifies the initial direction of travel at the start of the route (from
262 the lowest numbered waypoint) as a compass bearing from 0 to 360 degrees.
263 <dt>--highway-&lt;highway&gt;=&lt;preference&gt;
264 <dd>Selects the percentage preference for using each particular type of
265 highway. The value of &lt;highway&gt; can be selected from:
266 <ul>
267 <li>motorway = Motorway
268 <li>trunk = Trunk
269 <li>primary = Primary
270 <li>secondary = Secondary
271 <li>tertiary = Tertiary
272 <li>unclassified = Unclassified
273 <li>residential = Residential
274 <li>service = Service
275 <li>track = Track
276 <li>cycleway = Cycleway
277 <li>path = Path
278 <li>steps = Steps
279 <li>ferry = Ferry
280 </ul>
281 Default value depends on the profile selected by the --transport option.
282 <dt>--speed-&lt;highway&gt;=&lt;speed&gt;
283 <dd>Selects the speed limit in km/hour for each type of highway. Default
284 value depends on the profile selected by the --transport option.
285 <dt>--property-&lt;property&gt;=&lt;preference&gt;
286 <dd>Selects the percentage preference for using each particular highway
287 property
288 The value of &lt;property&gt; can be selected from:
289 <ul>
290 <li>paved = Paved (suitable for normal wheels)
291 <li>multilane = Multiple lanes
292 <li>bridge = Bridge
293 <li>tunnel = Tunnel
294 <li>footroute = A route marked for foot travel
295 <li>bicycleroute = A route marked for bicycle travel
296 </ul>
297 Default value depends on the profile selected by the --transport option.
298 <dt>--oneway=[0|1]
299 <dd>Selects if the direction of oneway streets are to be obeyed (useful to not
300 obey them when walking). Default value depends on the profile selected by
301 the --transport option.
302 <dt>--turns=[0|1]
303 <dd>Selects if turn restrictions are to be obeyed (useful to not obey them
304 when walking). Default value depends on the profile selected by the
305 --transport option.
306 <dt>--weight=&lt;weight&gt;
307 <dd>Specifies the weight of the mode of transport in tonnes; ensures that the
308 weight limit on the highway is not exceeded. Default value depends on the
309 profile selected by the --transport option.
310 <dt>--height=&lt;height&gt;
311 <dd>Specifies the height of the mode of transport in metres; ensures that the
312 height limit on the highway is not exceeded. Default value depends on the
313 profile selected by the --transport option.
314 <dt>--width=&lt;width&gt;
315 <dd>Specifies the width of the mode of transport in metres; ensures that the
316 width limit on the highway is not exceeded. Default value depends on the
317 profile selected by the --transport option.
318 <dt>--length=&lt;length&gt;
319 <dd>Specifies the length of the mode of transport in metres; ensures that the
320 length limit on the highway is not exceeded. Default value depends on the
321 profile selected by the --transport option.
322 </dl>
323
324 <p>
325 <i>Note: In version 1.5 of Routino a slim option has been added and at
326 compilation time a separate program called <em>router-slim</em> is created that
327 operates in slim mode. In slim mode the database files are read as needed
328 rather than being mapped into memory.</i>
329
330 <p>
331 The meaning of the &lt;preference&gt; parameter in the command line options is
332 slightly different for the highway preferences and the property preferences.
333 For the highway preference consider the choice between two possible highways
334 between the start and finish when looking for the shortest route. If highway A
335 has a preference of 100% and highway B has a preference of 90% then highway A
336 will be chosen even if it is up to 11% longer (100/90 = 111%). For the highway
337 properties each highway either has a particular property or not. If the
338 preference for the property is 60% then a highway with the property has a
339 preference of 77% (sqrt(60%)) and one without has a preference of 63%
340 (sqrt(100-60%)). A highway with the property will be chosen even if it is up to
341 22% longer than one without the property (77/63 = 122%). The overall preference
342 for each highway segment is the product of the preference for the highway type
343 and all of the preferences for the highway properties.
344
345 <p>
346 Example usage (motorbike journey, scenic route, not very fast):
347
348 <pre class="boxed">
349 ./router --dir=data --prefix=gb --transport=motorbike --highway-motorway=0 \
350 --highway-trunk=0 --speed-primary=80 --speed-secondary=80 --quickest
351 </pre>
352
353 This will use the files 'data/gb-nodes.mem', 'data/gb-segments.mem' and
354 'data/gb-ways.mem' to find the quickest route by motorbike not using motorways
355 or trunk roads and not exceeding 80 km/hr.
356
357
358 <h3><a name="H_1_1_3"></a>filedumper</h3>
359
360 This program is used to extract statistics from the database, extract particular
361 information for visualisation purposes or for dumping the database contents.
362
363 <pre class="boxed">
364 Usage: filedumper [--help]
365 [--dir=&lt;dirname&gt;] [--prefix=&lt;name&gt;]
366 [--statistics]
367 [--visualiser --latmin=&lt;latmin&gt; --latmax=&lt;latmax&gt;
368 --lonmin=&lt;lonmin&gt; --lonmax=&lt;lonmax&gt;
369 --data=&lt;data-type&gt;]
370 [--dump [--node=&lt;node&gt; ...]
371 [--segment=&lt;segment&gt; ...]
372 [--way=&lt;way&gt; ...]
373 [--turn-relation=&lt;relation&gt; ...]]
374 [--dump-osm [--no-super]
375 [--latmin=&lt;latmin&gt; --latmax=&lt;latmax&gt;
376 --lonmin=&lt;lonmin&gt; --lonmax=&lt;lonmax&gt;]]
377 </pre>
378
379 <dl>
380 <dt>--help
381 <dd>Prints out the help information.
382 <dt>--dir=&lt;dirname&gt;
383 <dd>Sets the directory name in which to read the local database.
384 Defaults to the current directory.
385 <dt>--prefix=&lt;name&gt;
386 <dd>Sets the filename prefix for the files in the local database.
387 <dt>--statistics
388 <dd>Prints out statistics about the database files.
389 <dt>--visualiser
390 <dd>Selects a data visualiser mode which will output a set of data according
391 to the other parameters below.
392 <dl>
393 <dt>--latmin=&lt;latmin&gt; --latmax=&lt;latmax&gt;
394 <dd>The range of latitudes to print the data for.
395 <dt>--lonmin=&lt;lonmin&gt; --lonmax=&lt;lonmax&gt;
396 <dd>The range of longitudes to print the data for.
397 <dt>--data=&lt;data-type&gt;
398 <dd>The type of data to output, &lt;data-type&gt; can be selected from:
399 <ul>
400 <li>junctions = segment count at each junction.
401 <li>super = super-node and super-segments.
402 <li>oneway = oneway segments.
403 <li>turns = turn restrictions.
404 <li>speed = speed limits.
405 <li>weight = weight limits.
406 <li>height = height limits.
407 <li>width = width limits.
408 <li>length = length limits.
409 </ul>
410 </dl>
411 <dt>--dump
412 <dd>Selects a data dumping mode which allows looking at individual items in
413 the databases (specifying 'all' instead of a number dumps all of them).
414 More than one of the following parameters can be specified on the command
415 line.
416 <dl>
417 <dt>--node=&lt;node&gt;
418 <dd>Prints the information about the selected node number (internal
419 number, not the node id number in the original source file).
420 <dt>--segment=&lt;segment&gt;
421 <dd>Prints the information about the selected segment number.
422 <dt>--way=&lt;way&gt;
423 <dd>Prints the information about the selected way number (internal
424 number, not the way id number in the original source file).
425 <dt>--turn-relation=&lt;relation&gt;
426 <dd>Prints the information about the selected turn relation number
427 (internal number, not the relation id number in the original source
428 file).
429 </dl>
430 <dt>--osm-dump
431 <dd>Dumps the contents of the database as an OSM format XML file, the whole
432 database will be dumped unless the latitude and longitude ranges are
433 specified.
434 <dl>
435 <dt>--no-super
436 <dd>The super segments will not be output.
437 <dt>--latmin=&lt;latmin&gt; --latmax=&lt;latmax&gt;
438 <dd>The range of latitudes to dump the data for.
439 <dt>--lonmin=&lt;lonmin&gt; --lonmax=&lt;lonmax&gt;
440 <dd>The range of longitudes to dump the data for.
441 </dl>
442 </dl>
443
444 <p>
445 <i>Note: In version 1.5 of Routino a slim option has been added and at
446 compilation time a separate program called <em>filedumper-slim</em> is created
447 that operates in slim mode. In slim mode the database files are read as needed
448 rather than being mapped into memory.</i>
449
450
451 <h3><a name="H_1_1_4"></a>tagmodifier</h3>
452
453 This program is used to run the tag transformation process on an OSM XML file
454 for test purposes.
455
456 <pre class="boxed">
457 Usage: tagmodifier [--help]
458 [--loggable]
459 [--tagging=&lt;filename&gt;]
460 [&lt;filename.osm&gt;]
461 </pre>
462
463 <dl>
464 <dt>--help
465 <dd>Prints out the help information.
466 <dt>--loggable
467 <dd>Print progress messages that are suitable for logging to a file; normally
468 an incrementing counter is printed which is more suitable for real-time
469 display than logging.
470 <dt>--tagging=&lt;filename&gt;
471 <dd>The name of the XML file containing the tagging rules (defaults to
472 'tagging.xml' in the current directory).
473 <dt>&lt;filename.osm&gt; ...
474 <dd>Specifies the filename to read data from, by default data is read from
475 the standard input.
476 </dl>
477
478 </div>
479
480 <!-- Content End -->
481
482 <!-- Footer Start -->
483
484 <div class="footer" align="center">
485 <hr>
486
487 <address>
488 &copy; Andrew M. Bishop = &lt;amb "at" gedanken.demon.co.uk&gt;
489 </address>
490
491 </div>
492
493 <!-- Footer End -->
494
495 </BODY>
496
497 </HTML>