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/USAGE.txt

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1503 - (show annotations) (download)
Thu Jan 30 18:45:56 2014 UTC (11 years, 2 months ago) by amb
File MIME type: text/plain
File size: 25691 byte(s)
Add an option to calculate a route in the reverse order.

1 Routino : Usage
2 ===============
3
4
5 There are five programs that make up this software. The first one takes
6 the planet.osm datafile from OpenStreetMap (or other source of data
7 using the same formats) and converts it into a local database. The
8 second program uses the database to determine an optimum route between
9 two points. The third program allows visualisation of the data and
10 statistics to be extracted. The fourth program allows dumping the raw
11 parsed data for test purposes and the fifth is a test program for the
12 tag transformations.
13
14
15 planetsplitter
16 --------------
17
18 This program reads in the OSM format XML file and splits it up to
19 create the database that is used for routing.
20
21 Usage: planetsplitter [--help]
22 [--dir=<dirname>] [--prefix=<name>]
23 [--sort-ram-size=<size>] [--sort-threads=<number>]
24 [--tmpdir=<dirname>]
25 [--tagging=<filename>]
26 [--loggable] [--logtime]
27 [--errorlog[=<name>]]
28 [--parse-only | --process-only]
29 [--append] [--keep] [--changes]
30 [--max-iterations=<number>]
31 [--prune-none]
32 [--prune-isolated=<len>]
33 [--prune-short=<len>]
34 [--prune-straight=<len>]
35 [<filename.osm> ... | <filename.osc> ...
36 | <filename.pbf> ...
37 | <filename.o5m> ... | <filename.o5c> ...
38 | <filename.(osm|osc|o5m|o5c).bz2> ...
39 | <filename.(osm|osc|o5m|o5c).gz> ...]
40
41 --help
42 Prints out the help information.
43
44 --dir=<dirname>
45 Sets the directory name in which to save the results. Defaults
46 to the current directory.
47
48 --prefix=<name>
49 Sets the filename prefix for the files that are created.
50 Defaults to no prefix.
51
52 --sort-ram-size=<size>
53 Specifies the amount of RAM (in MB) to use for sorting the data.
54 If not specified then 64 MB will be used in slim mode or 256 MB
55 otherwise.
56
57 --sort-threads=<number>
58 The number of threads to use for data sorting (the sorting
59 memory is shared between the threads - too many threads and not
60 enough memory will reduce the performance).
61
62 --tmpdir=<dirname>
63 Specifies the name of the directory to store the temporary disk
64 files. If not specified then it defaults to either the value of
65 the --dir option or the current directory.
66
67 --tagging=<filename>
68 Sets the filename containing the list of tagging rules in XML
69 format for the parsing the input files. If the file doesn't
70 exist then dirname, prefix and "profiles.xml" will be combined
71 and used, if that doesn't exist then the file
72 '/usr/local/share/routino/profiles.xml' (or custom installation
73 location) will be used.
74
75 --loggable
76 Print progress messages that are suitable for logging to a file;
77 normally an incrementing counter is printed which is more
78 suitable for real-time display than logging.
79
80 --logtime
81 Print the elapsed time for each processing step.
82
83 --errorlog[=<name>]
84 Log OSM parsing and processing errors to 'error.log' or the
85 specified file name (the '--dir' and '--prefix' options are
86 applied). If the --append option is used then the existing log
87 file will be appended, otherwise a new one will be created. If
88 the --keep option is also used a geographically searchable
89 database of error logs is created for use in the visualiser.
90
91 --parse-only
92 Parse the input files and store the data in intermediate files
93 but don't process the data into a routing database. This option
94 must be used with the --append option for all except the first
95 file.
96
97 --process-only
98 Don't read in any files but process the existing intermediate
99 files created by using the --parse-only option.
100
101 --append
102 Parse the input file and append the result to the existing
103 intermediate files; the appended file can be either an OSM file
104 or an OSC change file.
105
106 --keep
107 Store a set of intermediate files after parsing the OSM files,
108 sorting and removing duplicates; this allows appending an OSC
109 file and re-processing later.
110
111 --changes
112 This option indicates that the data being processed contains one
113 or more OSC (OSM changes) files, they must be applied in time
114 sequence if more than one is used. This option implies --append
115 when parsing data files and --keep when processing data.
116
117 --max-iterations=<number>
118 The maximum number of iterations to use when generating
119 super-nodes and super-segments. Defaults to 5 which is normally
120 enough.
121
122 --prune-none
123 Disable the prune options below, they can be re-enabled by
124 adding them to the command line after this option.
125
126 --prune-isolated=<length>
127 Remove the access permissions for a transport type from small
128 disconnected groups of segments and remove the segments if they
129 end up with no access permission (defaults to removing groups
130 under 500m).
131
132 --prune-short=<length>
133 Remove short segments (defaults to removing segments up to a
134 maximum length of 5m).
135
136 --prune-straight=<length>
137 Remove nodes in almost straight highways (defaults to removing
138 nodes up to 3m offset from a straight line).
139
140 <filename.osm>, <filename.osc>, <filename.pbf>, <filename.o5m>,
141 <filename.o5c>
142 Specifies the filename(s) to read data from. Filenames ending
143 '.pbf' will be read as PBF, filenames ending in '.o5m' or '.o5c'
144 will be read as O5M/O5C, otherwise as XML. Filenames ending
145 '.bz2' will be bzip2 uncompressed (if bzip2 support compiled
146 in). Filenames ending '.gz' will be gzip uncompressed (if gzip
147 support compiled in).
148
149 Note: In version 2.5 of Routino the ability to read data from the
150 standard input has been removed. This is because there is now the
151 ability to read compressed files (bzip2 and gzip) and PBF files
152 directly. Also using standard input the file type cannot be
153 auto-detected from the filename.
154
155 Example usage 1:
156
157 planetsplitter --dir=data --prefix=gb great_britain.osm
158
159 This will generate the output files 'data/gb-nodes.mem',
160 'data/gb-segments.mem' and 'data/gb-ways.mem'. Multiple filenames can
161 be specified on the command line and they will all be read in, combined
162 and processed together.
163
164 Example usage 2:
165
166 planetsplitter --dir=data --prefix=gb --parse-only great_britain_part1.osm
167 planetsplitter --dir=data --prefix=gb --parse-only --append great_britain_part2.osm
168 planetsplitter --dir=data --prefix=gb --parse-only --append ...
169 planetsplitter --dir=data --prefix=gb --process-only
170
171 This will generate the same output files as the first example but
172 parsing the input files is performed separately from the data
173 processing. The first file read in must not use the --append option but
174 the later ones must.
175
176 Example usage 3:
177
178 planetsplitter --dir=data --prefix=gb --keep great_britain.osm
179
180 planetsplitter --dir=data --prefix=gb --changes great_britain.osc
181
182 This will generate the same output files as the first example. The
183 first command will process the complete file and keep some intermediate
184 data for later. The second command will apply a set of changes to the
185 stored intermediate data and keep the updated intermediate files for
186 repeating this step later with more change data.
187
188 The parsing and processing can be split into multiple commands as it
189 was in example 2 with the --keep option used with --process-only for
190 the initial OSM file(s) and the --changes option used with --parse-only
191 or --process-only for every OSC file.
192
193
194 router
195 ------
196
197 This program performs the calculation of the optimum routes using the
198 database generated by the planetsplitter program.
199
200 Usage: router [--help | --help-profile | --help-profile-xml |
201 --help-profile-json | --help-profile-perl ]
202 [--dir=<dirname>] [--prefix=<name>]
203 [--profiles=<filename>] [--translations=<filename>]
204 [--exact-nodes-only]
205 [--loggable | --quiet]
206 [--output-html]
207 [--output-gpx-track] [--output-gpx-route]
208 [--output-text] [--output-text-all]
209 [--output-none] [--output-stdout]
210 [--profile=<name>]
211 [--transport=<transport>]
212 [--shortest | --quickest]
213 --lon1=<longitude> --lat1=<latitude>
214 --lon2=<longitude> --lon2=<latitude>
215 [ ... --lon99=<longitude> --lon99=<latitude>]
216 [--reverse]
217 [--heading=<bearing>]
218 [--highway-<highway>=<preference> ...]
219 [--speed-<highway>=<speed> ...]
220 [--property-<property>=<preference> ...]
221 [--oneway=(0|1)] [--turns=(0|1)]
222 [--weight=<weight>]
223 [--height=<height>] [--width=<width>] [--length=<length>]
224
225 --help
226 Prints out the help information.
227
228 --help-profile
229 Prints out the selected transport profile (type, speed limits,
230 highway preferences etc.)
231
232 --help-profile-xml
233 Prints out all the loaded profiles as an XML file in the same
234 format that can be loaded in.
235
236 --help-profile-json
237 Prints out all the loaded profiles in JavaScript Object Notation
238 (JSON) format for use in the interactive webpage.
239
240 --help-profile-perl
241 Prints out all the loaded profiles as a Perl object for use in
242 the router CGI.
243
244 --dir=<dirname>
245 Sets the directory name in which to read the local database.
246 Defaults to the current directory.
247
248 --prefix=<name>
249 Sets the filename prefix for the files in the local database.
250 Defaults to no prefix.
251
252 --profiles=<filename>
253 Sets the filename containing the list of routing profiles in XML
254 format. If the file doesn't exist then dirname, prefix and
255 "profiles.xml" will be combined and used, if that doesn't exist
256 then the file '/usr/local/share/routino/profiles.xml' (or custom
257 installation location) will be used.
258
259 --translations=<filename>
260 Sets the filename containing the list of translations in XML
261 format for the output files. If the file doesn't exist then
262 dirname, prefix and "translations.xml" will be combined and
263 used, if that doesn't exist then the file
264 '/usr/local/share/routino/translations.xml' (or custom
265 installation location) will be used.
266
267 --exact-nodes-only
268 When processing the specified latitude and longitude points only
269 select the nearest node instead of finding the nearest point
270 within a segment (quicker but less accurate unless the points
271 are already near nodes).
272
273 --loggable
274 Print progress messages that are suitable for logging to a file;
275 normally an incrementing counter is printed which is more
276 suitable for real-time display than logging.
277
278 --quiet
279 Don't generate any screen output while running (useful for
280 running in a script).
281
282 --language=<lang>
283 Select the language specified from the file of translations. If
284 this option is not given and the file exists then the first
285 language in the file will be used. If this option is not given
286 and no file exists the compiled-in default language (English)
287 will be used.
288
289 --output-html
290 --output-gpx-track
291 --output-gpx-route
292 --output-text
293 --output-text-all
294 Generate the selected output file formats (HTML, GPX track file,
295 GPX route file, plain text route and/or plain text with all
296 nodes). If no output is specified then all are generated,
297 specifying any automatically disables those not specified.
298
299 --output-none
300 Do not generate any output or read in any translations files.
301
302 --output-stdout
303 Write to stdout instead of a file (requires exactly one output
304 format option, implies '--quiet').
305
306 --profile=<name>
307 Specifies the name of the profile to use.
308
309 --transport=<transport>
310 Select the type of transport to use, <transport> can be set to:
311
312 + foot = Foot
313 + horse = Horse
314 + wheelchair = Wheelchair
315 + bicycle = Bicycle
316 + moped = Moped (Small motorcycle, limited speed)
317 + motorcycle = Motorcycle
318 + motorcar = Motorcar
319 + goods = Goods (Small lorry, van)
320 + hgv = HGV (Heavy Goods Vehicle - large lorry)
321 + psv = PSV (Public Service Vehicle - bus, coach)
322
323 Defaults to 'motorcar', this option also selects the default
324 profile information if the '--profile' option is not given and a
325 profile matching the transport name is found.
326
327 --shortest
328 Find the shortest route between the waypoints.
329
330 --quickest
331 Find the quickest route between the waypoints.
332
333 --lon1=<longitude>, --lat1=<latitude>
334 --lon2=<longitude>, --lat2=<latitude>
335 ... --lon99=<longitude>, --lat99=<latitude>
336 The location of the waypoints that make up the start, middle and
337 end points of the route. Up to 99 waypoints can be specified and
338 the route will pass through each of the specified ones in
339 sequence. The algorithm will use the closest node or point
340 within a segment that allows the specified traffic type.
341
342 --reverse
343 Find a route between the waypoints in reverse order.
344
345 --heading=<bearing>
346 Specifies the initial direction of travel at the start of the
347 route (from the lowest numbered waypoint) as a compass bearing
348 from 0 to 360 degrees.
349
350 --highway-<highway>=<preference>
351 Selects the percentage preference for using each particular type
352 of highway. The value of <highway> can be selected from:
353
354 + motorway = Motorway
355 + trunk = Trunk
356 + primary = Primary
357 + secondary = Secondary
358 + tertiary = Tertiary
359 + unclassified = Unclassified
360 + residential = Residential
361 + service = Service
362 + track = Track
363 + cycleway = Cycleway
364 + path = Path
365 + steps = Steps
366 + ferry = Ferry
367
368 Default value depends on the profile selected by the --transport
369 option.
370
371 --speed-<highway>=<speed>
372 Selects the speed limit in km/hour for each type of highway.
373 Default value depends on the profile selected by the --transport
374 option.
375
376 --property-<property>=<preference>
377 Selects the percentage preference for using each particular
378 highway property The value of <property> can be selected from:
379
380 + paved = Paved (suitable for normal wheels)
381 + multilane = Multiple lanes
382 + bridge = Bridge
383 + tunnel = Tunnel
384 + footroute = A route marked for foot travel
385 + bicycleroute = A route marked for bicycle travel
386
387 Default value depends on the profile selected by the --transport
388 option.
389
390 --oneway=[0|1]
391 Selects if the direction of oneway streets are to be obeyed
392 (useful to not obey them when walking). Default value depends on
393 the profile selected by the --transport option.
394
395 --turns=[0|1]
396 Selects if turn restrictions are to be obeyed (useful to not
397 obey them when walking). Default value depends on the profile
398 selected by the --transport option.
399
400 --weight=<weight>
401 Specifies the weight of the mode of transport in tonnes; ensures
402 that the weight limit on the highway is not exceeded. Default
403 value depends on the profile selected by the --transport option.
404
405 --height=<height>
406 Specifies the height of the mode of transport in metres; ensures
407 that the height limit on the highway is not exceeded. Default
408 value depends on the profile selected by the --transport option.
409
410 --width=<width>
411 Specifies the width of the mode of transport in metres; ensures
412 that the width limit on the highway is not exceeded. Default
413 value depends on the profile selected by the --transport option.
414
415 --length=<length>
416 Specifies the length of the mode of transport in metres; ensures
417 that the length limit on the highway is not exceeded. Default
418 value depends on the profile selected by the --transport option.
419
420 The meaning of the <preference> parameter in the command line options
421 is slightly different for the highway preferences and the property
422 preferences. For the highway preference consider the choice between two
423 possible highways between the start and finish when looking for the
424 shortest route. If highway A has a preference of 100% and highway B has
425 a preference of 90% then highway A will be chosen even if it is up to
426 11% longer (100/90 = 111%). For the highway properties each highway
427 either has a particular property or not. If the preference for the
428 property is 60% then a highway with the property has a preference of
429 77% (sqrt(60%)) and one without has a preference of 63%
430 (sqrt(100-60%)). A highway with the property will be chosen even if it
431 is up to 22% longer than one without the property (77/63 = 122%). The
432 overall preference for each highway segment is the product of the
433 preference for the highway type and all of the preferences for the
434 highway properties.
435
436 Example usage (motorcycle journey, scenic route, not very fast):
437
438 router --dir=data --prefix=gb --transport=motorcycle --highway-motorway=0 \
439 --highway-trunk=0 --speed-primary=80 --speed-secondary=80 --quickest
440
441 This will use the files 'data/gb-nodes.mem', 'data/gb-segments.mem' and
442 'data/gb-ways.mem' to find the quickest route by motorcycle not using
443 motorways or trunk roads and not exceeding 80 km/hr.
444
445
446 filedumper
447 ----------
448
449 This program is used to extract statistics from the database, extract
450 particular information for visualisation purposes or for dumping the
451 database contents.
452
453 Usage: filedumper [--help]
454 [--dir=<dirname>] [--prefix=<name>]
455 [--statistics]
456 [--visualiser --latmin=<latmin> --latmax=<latmax>
457 --lonmin=<lonmin> --lonmax=<lonmax>
458 --data=<data-type>]
459 [--dump [--node=<node> ...]
460 [--segment=<segment> ...]
461 [--way=<way> ...]
462 [--turn-relation=<relation> ...]
463 [--errorlog=<number> ...]]
464 [--dump-osm [--no-super]
465 [--latmin=<latmin> --latmax=<latmax>
466 --lonmin=<lonmin> --lonmax=<lonmax>]]
467 [--dump-visualiser [--data=node<node>]
468 [--data=segment<segment>]
469 [--data=turn-relation<rel>]
470 [--data=errorlog<number>]]
471
472 --help
473 Prints out the help information.
474
475 --dir=<dirname>
476 Sets the directory name in which to read the local database.
477 Defaults to the current directory.
478
479 --prefix=<name>
480 Sets the filename prefix for the files in the local database.
481
482 --statistics
483 Prints out statistics about the database files.
484
485 --visualiser
486 Selects a data visualiser mode which will output a set of data
487 according to the other parameters below.
488
489 --latmin=<latmin> --latmax=<latmax>
490 The range of latitudes to print the data for.
491
492 --lonmin=<lonmin> --lonmax=<lonmax>
493 The range of longitudes to print the data for.
494
495 --data=<data-type>
496 The type of data to output, <data-type> can be selected
497 from:
498
499 o junctions = segment count at each junction.
500 o super = super-node and super-segments.
501 o oneway = oneway segments.
502 o highway-* = segments of the specified highway type (e.g.
503 highway-primary to display segments ofprimary roads).
504 o transport-* = segments allowing the specified transport
505 type (e.g. transport-foot to display segments accessible
506 on foot).
507 o turns = turn restrictions.
508 o speed = speed limits.
509 o weight = weight limits.
510 o height = height limits.
511 o width = width limits.
512 o length = length limits.
513 o property-* = segments having the specified property (e.g.
514 property-paved to display segments of paved highway).
515 o errorlogs = errors logged during parsing.
516
517 --dump
518 Selects a data dumping mode which allows looking at individual
519 items in the databases (specifying 'all' instead of a number
520 dumps all of them). More than one of the following parameters
521 can be specified on the command line.
522
523 --node=<node>
524 Prints the information about the selected node number
525 (internal number, not the node id number in the original
526 source file).
527
528 --segment=<segment>
529 Prints the information about the selected segment number.
530
531 --way=<way>
532 Prints the information about the selected way number
533 (internal number, not the way id number in the original
534 source file).
535
536 --turn-relation=<relation>
537 Prints the information about the selected turn relation
538 number (internal number, not the relation id number in the
539 original source file).
540
541 --errorlog=<number>
542 Prints the information about the selected error log that
543 was stored when the data was parsed.
544
545 --osm-dump
546 Dumps the contents of the database as an OSM format XML file,
547 the whole database will be dumped unless the latitude and
548 longitude ranges are specified.
549
550 --no-super
551 The super segments will not be output.
552
553 --latmin=<latmin> --latmax=<latmax>
554 The range of latitudes to dump the data for.
555
556 --lonmin=<lonmin> --lonmax=<lonmax>
557 The range of longitudes to dump the data for.
558
559 --dump-visualiser
560 Dumps the contents of the database as HTML formatted items for
561 display in the visualiser web page.
562
563 --data=node<node>
564 Prints the information about the selected node number
565 (internal node number, not from the original source file).
566
567 --data=segment<segment>
568 Prints the information about the selected segment number
569 as if it was a way (internal segment number, unrelated to
570 original source file).
571
572 --data=turn-relation<relation>
573 Prints the information about the selected turn relation
574 number (internal turn relation number, not from the
575 original source file).
576
577 --data=errorlog<number>
578 Prints the information about the selected error log that
579 was stored when the data was parsed.
580
581
582 filedumperx
583 -----------
584
585 This program is a modified version of filedumper that will dump out the
586 contents of the intermediate data that is saved by planetsplitter after
587 processing using the --keep or --changes option. This is intended
588 for test purposes only and gives no useful information about the
589 routing database.
590
591 Usage: filedumperx [--help]
592 [--dir=<dirname>] [--prefix=<name>]
593 [--dump [--nodes]
594 [--ways]
595 [--route-relations]
596 [--turn-relations]]
597
598 --help
599 Prints out the help information.
600
601 --dir=<dirname>
602 Sets the directory name in which to read the local database.
603 Defaults to the current directory.
604
605 --prefix=<name>
606 Sets the filename prefix for the files in the local database.
607
608 --dump
609 Dumps the complete set of data in the intermediate files that
610 are written by planetsplitter using the --keep or --changes
611 options.
612
613 --nodes
614 Dumps the node data.
615
616 --ways
617 Dumps the way data.
618
619 --route-relations
620 Dumps the route relation data.
621
622 --turn-relations
623 Dumps the turn relation data.
624
625
626 --------
627
628 Copyright 2008-2014 Andrew M. Bishop.

Properties

Name Value
cvs:description Description of program usage.