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