Check out the latest version of Routino: svn co http://routino.org/svn/trunk routino
Contents of /trunk/doc/html/usage.html
Parent Directory
|
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)
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=<dirname>] [--prefix=<name>] |
65 | [--sort-ram-size=<size>] |
66 | [--tmpdir=<dirname>] |
67 | [--tagging=<filename>] |
68 | [--loggable] [--logtime] |
69 | [--errorlog[=<name>]] |
70 | [--parse-only | --process-only] |
71 | [--max-iterations=<number>] |
72 | [--prune-none] |
73 | [--prune-isolated=<len>] |
74 | [--prune-short=<len>] |
75 | [--prune-straight=<len>] |
76 | [<filename.osm> ...] |
77 | </pre> |
78 | |
79 | <dl> |
80 | <dt>--help |
81 | <dd>Prints out the help information. |
82 | <dt>--dir=<dirname> |
83 | <dd>Sets the directory name in which to save the results. |
84 | Defaults to the current directory. |
85 | <dt>--prefix=<name> |
86 | <dd>Sets the filename prefix for the files that are created. |
87 | Defaults to no prefix. |
88 | <dt>--sort-ram-size=<size> |
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=<dirname> |
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=<filename> |
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[=<name>] |
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=<number> |
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=<length> |
123 | <dd>Remove small disconnected groups of segments (defaults to removing groups |
124 | under 500m). |
125 | <dt>--prune-short=<length> |
126 | <dd>Remove short segments (defaults to removing segments up to a maximum |
127 | length of 5m). |
128 | <dt>--prune-straight=<length> |
129 | <dd>Remove nodes in almost straight highways (defaults to removing nodes up to |
130 | 3m offset from a straight line). |
131 | <dt><filename.osm> ... |
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=<dirname>] [--prefix=<name>] |
170 | [--profiles=<filename>] [--translations=<filename>] |
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=<name>] |
178 | [--transport=<transport>] |
179 | [--shortest | --quickest] |
180 | --lon1=<longitude> --lat1=<latitude> |
181 | --lon2=<longitude> --lon2=<latitude> |
182 | [ ... --lon99=<longitude> --lon99=<latitude>] |
183 | [--heading=<bearing>] |
184 | [--highway-<highway>=<preference> ...] |
185 | [--speed-<highway>=<speed> ...] |
186 | [--property-<property>=<preference> ...] |
187 | [--oneway=(0|1)] [--turns=(0|1)] |
188 | [--weight=<weight>] |
189 | [--height=<height>] [--width=<width>] [--length=<length>] |
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=<dirname> |
208 | <dd>Sets the directory name in which to read the local database. |
209 | Defaults to the current directory. |
210 | <dt>--prefix=<name> |
211 | <dd>Sets the filename prefix for the files in the local database. |
212 | Defaults to no prefix. |
213 | <dt>--profiles=<filename> |
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=<filename> |
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=<lang> |
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=<name> |
252 | <dd>Specifies the name of the profile to use. |
253 | <dt>--transport=<transport> |
254 | <dd>Select the type of transport to use, <transport> 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=<longitude>, --lat1=<latitude> |
275 | <dt>--lon2=<longitude>, --lat2=<latitude> |
276 | <dt>... --lon99=<longitude>, --lat99=<latitude> |
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=<bearing> |
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-<highway>=<preference> |
286 | <dd>Selects the percentage preference for using each particular type of |
287 | highway. The value of <highway> 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-<highway>=<speed> |
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-<property>=<preference> |
308 | <dd>Selects the percentage preference for using each particular highway |
309 | property |
310 | The value of <property> 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=<weight> |
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=<height> |
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=<width> |
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=<length> |
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 <preference> 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=<dirname>] [--prefix=<name>] |
388 | [--statistics] |
389 | [--visualiser --latmin=<latmin> --latmax=<latmax> |
390 | --lonmin=<lonmin> --lonmax=<lonmax> |
391 | --data=<data-type>] |
392 | [--dump [--node=<node> ...] |
393 | [--segment=<segment> ...] |
394 | [--way=<way> ...] |
395 | [--turn-relation=<relation> ...]] |
396 | [--dump-osm [--no-super] |
397 | [--latmin=<latmin> --latmax=<latmax> |
398 | --lonmin=<lonmin> --lonmax=<lonmax>]] |
399 | </pre> |
400 | |
401 | <dl> |
402 | <dt>--help |
403 | <dd>Prints out the help information. |
404 | <dt>--dir=<dirname> |
405 | <dd>Sets the directory name in which to read the local database. |
406 | Defaults to the current directory. |
407 | <dt>--prefix=<name> |
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=<latmin> --latmax=<latmax> |
416 | <dd>The range of latitudes to print the data for. |
417 | <dt>--lonmin=<lonmin> --lonmax=<lonmax> |
418 | <dd>The range of longitudes to print the data for. |
419 | <dt>--data=<data-type> |
420 | <dd>The type of data to output, <data-type> 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=<node> |
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=<segment> |
443 | <dd>Prints the information about the selected segment number. |
444 | <dt>--way=<way> |
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=<relation> |
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=<latmin> --latmax=<latmax> |
460 | <dd>The range of latitudes to dump the data for. |
461 | <dt>--lonmin=<lonmin> --lonmax=<lonmax> |
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=<filename>] |
482 | [<filename.osm>] |
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=<filename> |
493 | <dd>The name of the XML file containing the tagging rules (defaults to |
494 | 'tagging.xml' in the current directory). |
495 | <dt><filename.osm> ... |
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 | © Andrew M. Bishop = <amb "at" gedanken.demon.co.uk> |
511 | </address> |
512 | |
513 | </div> |
514 | |
515 | <!-- Footer End --> |
516 | |
517 | </BODY> |
518 | |
519 | </HTML> |