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 1136 - (show annotations) (download) (as text)
Sat Nov 10 19:23:32 2012 UTC (12 years, 4 months ago) by amb
File MIME type: text/html
File size: 23696 byte(s)
Added a --preserve option which keeps the raw data files after parsing, sorting
and de-duplication.

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