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