Routino SVN Repository Browser

Check out the latest version of Routino: svn co http://routino.org/svn/trunk routino

ViewVC logotype

Annotation of /trunk/doc/USAGE.txt

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1201 - (hide annotations) (download)
Sat Dec 15 11:58:33 2012 UTC (12 years, 3 months ago) by amb
File MIME type: text/plain
File size: 25813 byte(s)
Add the --logtime and --errorlog options to tagmodifier.

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

Properties

Name Value
cvs:description Description of program usage.