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