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 982 - (show annotations) (download) (as text)
Sat Mar 17 14:04:17 2012 UTC (13 years ago) by amb
File MIME type: text/html
File size: 21850 byte(s)
Add a new '--logtime' option that prints the elapsed time for planetsplitter.

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