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 1151 - (hide annotations) (download)
Sun Nov 18 17:24:50 2012 UTC (12 years, 4 months ago) by amb
File MIME type: text/plain
File size: 25346 byte(s)
Using --parse-only and --preserve must sort the data so that it is ready to
apply the changes.

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 1140 [--append] [--preserve] [--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 953 [<filename.osm> ...]
35 amb 152
36     --help
37     Prints out the help information.
38    
39 amb 381 --dir=<dirname>
40 amb 152 Sets the directory name in which to save the results. Defaults
41     to the current directory.
42    
43     --prefix=<name>
44     Sets the filename prefix for the files that are created.
45     Defaults to no prefix.
46    
47 amb 381 --sort-ram-size=<size>
48     Specifies the amount of RAM (in MB) to use for sorting the data.
49 amb 515 If not specified then 64 MB will be used in slim mode or 256 MB
50     otherwise.
51 amb 381
52 amb 991 --sort-threads=<number>
53     The number of threads to use for data sorting (the sorting
54 amb 1023 memory is shared between the threads - too many threads and not
55     enough memory will reduce the performance).
56 amb 991
57 amb 381 --tmpdir=<dirname>
58 amb 288 Specifies the name of the directory to store the temporary disk
59     files. If not specified then it defaults to either the value of
60     the --dir option or the current directory.
61    
62 amb 953 --tagging=<filename>
63     Sets the filename containing the list of tagging rules in XML
64     format for the parsing the input files. If the file doesn't
65     exist then dirname, prefix and "profiles.xml" will be combined
66     and used, if that doesn't exist then the file
67     '/usr/local/share/routino/profiles.xml' (or custom installation
68     location) will be used.
69 amb 381
70 amb 524 --loggable
71     Print progress messages that are suitable for logging to a file;
72     normally an incrementing counter is printed which is more
73 amb 737 suitable for real-time display than logging.
74 amb 524
75 amb 982 --logtime
76     Print the elapsed time for each processing step.
77    
78 amb 810 --errorlog[=<name>]
79     Log OSM parsing and processing errors to 'error.log' or the
80     specified file name (the '--dir' and '--prefix' options are
81 amb 1120 applied). If the --append option is used then the existing log
82     file will be appended, otherwise a new one will be created.
83 amb 804
84 amb 953 --parse-only
85 amb 1120 Parse the input files and store the data in intermediate files
86     but don't process the data into a routing database. This option
87     must be used with the --append option for all except the first
88     file.
89 amb 953
90     --process-only
91 amb 1120 Don't read in any files but process the existing intermediate
92     files created by using the --parse-only option.
93 amb 953
94 amb 1120 --append
95     Parse the input file and append the result to the existing
96 amb 1140 intermediate files; the appended file can be either an OSM file
97     or an OSC change file.
98 amb 1120
99 amb 1136 --preserve
100     Store a set of intermediate files after parsing the OSM files,
101 amb 1151 sorting and removing duplicates. This option must be used before
102     the first OSC changes file is applied even if the --parse-only
103     option was used to read the data.
104 amb 1136
105 amb 1140 --changes
106     This option indicates that the data being processed contains one
107     or more OSC (OSM changes) files, they must be applied in time
108     sequence if more than one is used. This option implies --append
109     when parsing data files and --preserve when processing data.
110 amb 1151 Changes can only be applied if the previous run to create the
111     intermediate files used the --preserve option.
112 amb 1140
113 amb 318 --max-iterations=<number>
114     The maximum number of iterations to use when generating
115 amb 861 super-nodes and super-segments. Defaults to 5 which is normally
116 amb 318 enough.
117    
118 amb 975 --prune-none
119     Disable the prune options below, they can be re-enabled by
120     adding them to the command line after this option.
121 amb 318
122 amb 975 --prune-isolated=<length>
123 amb 1117 Remove the access permissions for a transport type from small
124     disconnected groups of segments and remove the segments if they
125     nd up with no access permission (defaults to removing groups
126     under 500m).
127 amb 964
128 amb 975 --prune-short=<length>
129     Remove short segments (defaults to removing segments up to a
130     maximum length of 5m).
131 amb 966
132 amb 975 --prune-straight=<length>
133     Remove nodes in almost straight highways (defaults to removing
134     nodes up to 3m offset from a straight line).
135    
136 amb 381 <filename.osm> ...
137     Specifies the filename(s) to read data from, by default data is
138     read from the standard input.
139    
140 amb 420 Note: In version 1.4 of Routino the --transport, --not-highway and
141 amb 429 --not-property options have been removed. The same functionality can be
142 amb 737 achieved by editing the tagging rules file to not output unwanted data.
143 amb 420
144 amb 515 Note: In version 1.5 of Routino the --slim option has been removed but
145     at compilation time a separate program called planetsplitter-slim is
146     created that operates in slim mode. In slim mode the temporary files
147     and database files are read as needed rather than being mapped into
148     memory. This allows a database size greater than 2 GB on 32-bit
149     machines or usage with little or no virtual memory (e.g. some virtual
150 amb 953 machines). The penalty for this is that the program takes about twice
151     as long to run.
152 amb 515
153 amb 1120 Example usage 1:
154 amb 381
155 amb 1120 planetsplitter --dir=data --prefix=gb great_britain.osm
156 amb 180
157 amb 152 This will generate the output files 'data/gb-nodes.mem',
158 amb 1120 'data/gb-segments.mem' and 'data/gb-ways.mem'. Multiple filenames can
159     be specified on the command line and they will all be read in, combined
160     and processed together.
161 amb 152
162 amb 1120 Example usage 2:
163 amb 318
164 amb 1120 planetsplitter --dir=data --prefix=gb --parse-only great_britain_part1.osm
165     planetsplitter --dir=data --prefix=gb --parse-only --append great_britain_part2.osm
166     planetsplitter --dir=data --prefix=gb --parse-only --append ...
167     planetsplitter --dir=data --prefix=gb --process-only
168    
169     This will generate the same output files as the first example but
170     parsing the input files is performed separately from the data
171     processing. The first file read in must not use the --append option but
172     the later ones must.
173    
174 amb 1140 Example usage 3:
175 amb 1120
176 amb 1140 planetsplitter --dir=data --prefix=gb --preserve great_britain_part.osm
177    
178 amb 1149 planetsplitter --dir=data --prefix=gb --changes great_britain.osc
179 amb 1140
180     This will generate the same output files as the first example. The
181     first command will process the complete file and keep some intermediate
182     data for later. The second command will apply a set of changes to the
183     stored intermediate data and keep the updated intermediate files for
184     repeating this step later with more change data.
185    
186     The parsing and processing can be split into multiple commands as it
187 amb 1151 was in example 2. The --process-only option can be used for the initial
188     OSM file(s) but --preserve is required with the final OSM file to
189     ensure that the data is sorted before applying the changes. The
190     --changes option can be used with --parse-only and then --process-only
191     and --preserve for the 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     processing using the --preserve or --changes option. This is intended
555     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     are written by planetsplitter using the --preserve or --changes
579     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 amb 524 [--loggable]
605 amb 420 [--tagging=<filename>]
606     [<filename.osm>]
607    
608     --help
609     Prints out the help information.
610    
611 amb 524 --loggable
612     Print progress messages that are suitable for logging to a file;
613     normally an incrementing counter is printed which is more
614 amb 737 suitable for real-time display than logging.
615 amb 524
616 amb 420 --tagging=<filename>
617     The name of the XML file containing the tagging rules (defaults
618     to 'tagging.xml' in the current directory).
619    
620     <filename.osm> ...
621     Specifies the filename to read data from, by default data is
622     read from the standard input.
623    
624 amb 429
625 amb 152 --------
626    
627 amb 975 Copyright 2008-2012 Andrew M. Bishop.

Properties

Name Value
cvs:description Description of program usage.