1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5 Routino documentation - usage
7 Part of the Routino routing software.
9 This file Copyright 2008-2010 Andrew M. Bishop
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.
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.
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/.
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">
35 <div class="header" align="center">
37 <h1>Routino : Usage</h1>
44 <!-- Content Start -->
48 <h2><a name="H_1_1"></a>Program Usage</h2>
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.
57 <h3><a name="H_1_1_1"></a>planetsplitter</h3>
59 This program reads in the OSM format XML file and splits it up to create the
60 database that is used for routing.
63 Usage: planetsplitter [--help]
64 [--dir=<dirname>] [--prefix=<name>]
65 [--sort-ram-size=<size>]
66 [--tmpdir=<dirname>]
67 [--parse-only | --process-only]
69 [--max-iterations=<number>]
70 [--tagging=<filename>]
71 [<filename.osm> ...]
76 <dd>Prints out the help information.
77 <dt>--dir=<dirname>
78 <dd>Sets the directory name in which to save the results.
79 Defaults to the current directory.
80 <dt>--prefix=<name>
81 <dd>Sets the filename prefix for the files that are created.
82 Defaults to no prefix.
83 <dt>--sort-ram-size=<size>
84 <dd>Specifies the amount of RAM (in MB) to use for sorting the data. If not
85 specified then 64 MB will be used in slim mode or 256 MB otherwise.
86 <dt>--tmpdir=<dirname>
87 <dd>Specifies the name of the directory to store the temporary disk files. If
88 not specified then it defaults to either the value of the --dir option or the
91 <dd>Parse the input files and store them in a temporary file but don't process
92 the data into a routing database.
94 <dd>Don't read in any files but process the existing temporary file into the
97 <dd>Print progress messages that are suitable for logging to a file; normally
98 an incrementing counter is printed which is more suitable for realtime
100 <dt>--max-iterations=<number>
101 <dd>The maximum number of iterations to use when generating super-nodes and
102 super-segments. Defaults to 10 which is normally enough.
103 <dt>--tagging=<filename>
104 <dd>Sets the filename containing the list of tagging rules in XML format for
105 the parsing the input files. If the file doesn't exist then dirname, prefix
106 and "profiles.xml" will be combined and used, if that doesn't exist then the
107 file '/usr/local/share/routino/profiles.xml' (or custom installation
108 location) will be used.
109 <dt><filename.osm> ...
110 <dd>Specifies the filename(s) to read data from, by default data is read from
115 <i>Note: In version 1.4 of Routino the --transport, --not-highway and
116 --not-property options have been removed. The same functionality can be
117 achieved by editing the tagging rules file to not output unwwanted data.</i>
120 <i>Note: In version 1.5 of Routino the --slim option has been removed but at
121 compilation time a separate program called <em>planetsplitter-slim</em> is
122 created that operates in slim mode. In slim mode the temporary files and
123 database files are read as needed rather than being mapped into memory. This
124 allows a database size greater than 2 GB on 32-bit machines or usage with little
125 or no virtual memory (e.g. some virtual machines). The penalty for this is that
126 the program takes about four times as long to run.</i>
132 ./planetsplitter --dir=data --prefix=gb great_britain.osm
135 This will generate the output files 'data/gb-nodes.mem', 'data/gb-segments.mem'
136 and 'data/gb-ways.mem'.
139 <h3><a name="H_1_1_2"></a>router</h3>
141 This program performs the calculation of the optimum routes using the database
142 generated by the planetsplitter program.
145 Usage: router [--help | --help-profile | --help-profile-xml |
146 --help-profile-json | --help-profile-perl ]
147 [--dir=<dirname>] [--prefix=<name>]
148 [--profiles=<filename>] [--translations=<filename>]
150 [--loggable | --quiet]
152 [--output-gpx-track] [--output-gpx-route]
153 [--output-text] [--output-text-all]
155 [--profile=<name>]
156 [--transport=<transport>]
157 [--shortest | --quickest]
158 --lon1=<longitude> --lat1=<latitude>
159 --lon2=<longitude> --lon2=<latitude>
160 [ ... --lon99=<longitude> --lon99=<latitude>]
161 [--highway-<highway>=<preference> ...]
162 [--speed-<highway>=<speed> ...]
163 [--property-<property>=<preference> ...]
165 [--weight=<weight>]
166 [--height=<height>] [--width=<width>] [--length=<length>]
171 <dd>Prints out the help information.
173 <dd>Prints out the selected transport profile (type, speed limits, highway
175 <dt>--help-profile-xml
176 <dd>Prints out all the loaded profiles as an XML file in the same format that
178 <dt>--help-profile-json
179 <dd>Prints out all the loaded profiles in JavaScript Object Notation (JSON)
180 format for use in the interactive webpage.
181 <dt>--help-profile-perl
182 <dd>Prints out all the loaded profiles as a Perl object for use in the router
184 <dt>--dir=<dirname>
185 <dd>Sets the directory name in which to read the local database.
186 Defaults to the current directory.
187 <dt>--prefix=<name>
188 <dd>Sets the filename prefix for the files in the local database.
189 Defaults to no prefix.
190 <dt>--profiles=<filename>
191 <dd>Sets the filename containing the list of routing profiles in XML format.
192 If the file doesn't exist then dirname, prefix and "profiles.xml" will be
193 combined and used, if that doesn't exist then the file
194 '/usr/local/share/routino/profiles.xml' (or custom installation location)
196 <dt>--translations=<filename>
197 <dd>Sets the filename containing the list of translations in XML format for
198 the output files. If the file doesn't exist then dirname, prefix and
199 "translations.xml" will be combined and used, if that doesn't exist then the
200 file '/usr/local/share/routino/translations.xml' (or custom installation
201 location) will be used.
202 <dt>--exact-nodes-only
203 <dd>When processing the specified latitude and longitude points only select
204 the nearest node instead of finding the nearest point within a segment
205 (quicker but less accurate unless the points are already near nodes).
207 <dd>Print progress messages that are suitable for logging to a file; normally
208 an incrementing counter is printed which is more suitable for realtime
209 display than logging.
211 <dd>Don't generate any screen output while running (useful for running in a script).
212 <dt>--language=<lang>
213 <dd>Select the language specified from the file of translations. If this
214 option is not given and the file exists then the first language in the file
215 will be used. If this option is not given and no file exists the
216 compiled-in default language (English) will be used.
218 <dt>--output-gpx-track
219 <dt>--output-gpx-route
221 <dt>--output-text-all
222 <dd>Generate the selected output file formats (HTML, GPX track file, GPX route
223 file, plain text route and/or plain text with all nodes). If no output is
224 specified then all are generated, specifying any automatically disables those
227 <dd>Do not generate any output or read in any translations files.
228 <dt>--profile=<name>
229 <dd>Specifies the name of the profile to use.
230 <dt>--transport=<transport>
231 <dd>Select the type of transport to use, <transport> can be set to:
235 <li>wheelchair = Wheelchair
236 <li>bicycle = Bicycle
237 <li>moped = Moped (Small motorbike, limited speed)
238 <li>motorbike = Motorbike
239 <li>motorcar = Motorcar
240 <li>goods = Goods (Small lorry, van)
241 <li>hgv = HGV (Heavy Goods Vehicle - large lorry)
242 <li>psv = PSV (Public Service Vehicle - bus, coach)
244 Defaults to 'motorcar', this option also selects the default profile
245 information if the '--profile' option is not given and a profile matching
246 the transport name is found.
248 <dd>Find the shortest route between the waypoints.
250 <dd>Find the quickest route between the waypoints.
251 <dt>--lon1=<longitude>, --lat1=<latitude>
252 <dt>--lon2=<longitude>, --lat2=<latitude>
253 <dt>... --lon99=<longitude>, --lat99=<latitude>
254 <dd>The location of the waypoints that make up the start, middle and end
255 points of the route. Up to 99 waypoints can be specified and the route will
256 pass through each of the specified ones in sequence. The algorithm will use
257 the closest node or point within a segment that allows the specified traffic
259 <dt>--highway-<highway>=<preference>
260 <dd>Selects the percentage preference for using each particular type of
261 highway. The value of <highway> can be selected from:
263 <li>motorway = Motorway
265 <li>primary = Primary
266 <li>secondary = Secondary
267 <li>tertiary = Tertiary
268 <li>unclassified = Unclassified
269 <li>residential = Residential
270 <li>service = Service
272 <li>cycleway = Cycleway
277 Default value depends on the profile selected by the --transport option.
278 <dt>--speed-<highway>=<speed>
279 <dd>Selects the speed limit in km/hour for each type of highway. Default
280 value depends on the profile selected by the --transport option.
281 <dt>--property-<property>=<preference>
282 <dd>Selects the percentage preference for using each particular highway
284 The value of <property> can be selected from:
286 <li>paved = Paved (suitable for normal wheels)
287 <li>multilane = Multiple lanes
290 <li>footroute = A route marked for foot travel
291 <li>bicycleroute = A route marked for bicycle travel
293 Default value depends on the profile selected by the --transport option.
295 <dd>Selects if the direction of oneway streets are to be obeyed (useful to not
296 obey them when walking). Default value depends on the profile selected by
297 the --transport option.
298 <dt>--weight=<weight>
299 <dd>Specifies the weight of the mode of transport in tonnes; ensures that the
300 weight limit on the highway is not exceeded. Default value depends on the
301 profile selected by the --transport option.
302 <dt>--height=<height>
303 <dd>Specifies the height of the mode of transport in metres; ensures that the
304 height limit on the highway is not exceeded. Default value depends on the
305 profile selected by the --transport option.
306 <dt>--width=<width>
307 <dd>Specifies the width of the mode of transport in metres; ensures that the
308 width limit on the highway is not exceeded. Default value depends on the
309 profile selected by the --transport option.
310 <dt>--length=<length>
311 <dd>Specifies the length of the mode of transport in metres; ensures that the
312 length limit on the highway is not exceeded. Default value depends on the
313 profile selected by the --transport option.
317 <i>Note: In version 1.5 of Routino a slim option has been added and at
318 compilation time a separate program called <em>router-slim</em> is created that
319 operates in slim mode. In slim mode the database files are read as needed
320 rather than being mapped into memory.</i>
323 The meaning of the <preference> parameter in the command line options is
324 slightly different for the highway preferences and the property preferences.
325 For the highway preference consider the choice between two possible highways
326 between the start and finish when looking for the shortest route. If highway A
327 has a preference of 100% and highway B has a preference of 90% then highway A
328 will be chosen even if it is up to 11% longer (100/90 = 111%). For the highway
329 properties each highway either has a particular property or not. If the
330 preference for the property is 60% then a highway with the property has a
331 preference of 77% (sqrt(60%)) and one without has a preference of 63%
332 (sqrt(100-60%)). A highway with the property will be chosen even if it is up to
333 22% longer than one without the property (77/63 = 122%). The overall preference
334 for each highway segment is the product of the preference for the highway type
335 and all of the preferences for the highway properties.
338 Example usage (motorbike journey, scenic route, not very fast):
341 ./router --dir=data --prefix=gb --transport=motorbike --highway-motorway=0 \
342 --highway-trunk=0 --speed-primary=80 --speed-secondary=80 --quickest
345 This will use the files 'data/gb-nodes.mem', 'data/gb-segments.mem' and
346 'data/gb-ways.mem' to find the quickest route by motorbike not using motorways
347 or trunk roads and not exceeding 80 km/hr.
350 <h3><a name="H_1_1_3"></a>filedumper</h3>
352 This program is used to extract statistics from the database, extract particular
353 information for visualisation purposes or for dumping the database contents.
356 Usage: filedumper [--help]
357 [--dir=<dirname>] [--prefix=<name>]
359 [--visualiser --latmin=<latmin> --latmax=<latmax>
360 --lonmin=<lonmin> --lonmax=<lonmax>
361 --data=<data-type>]
362 [--dump [--node=<node> ...]
363 [--segment=<segment> ...]
364 [--way=<way> ...]]
365 [--dump-osm [--no-super]
366 [--latmin=<latmin> --latmax=<latmax>
367 --lonmin=<lonmin> --lonmax=<lonmax>]]
372 <dd>Prints out the help information.
373 <dt>--dir=<dirname>
374 <dd>Sets the directory name in which to read the local database.
375 Defaults to the current directory.
376 <dt>--prefix=<name>
377 <dd>Sets the filename prefix for the files in the local database.
379 <dd>Prints out statistics about the database files.
381 <dd>Selects a data visualiser mode which will output a set of data according
382 to the other parameters below.
384 <dt>--latmin=<latmin> --latmax=<latmax>
385 <dd>The range of latitudes to print the data for.
386 <dt>--lonmin=<lonmin> --lonmax=<lonmax>
387 <dd>The range of longitudes to print the data for.
388 <dt>--data=<data-type>
389 <dd>The type of data to output, <data-type> can be selected from:
391 <li>junctions = segment count at each junction.
392 <li>super = super-node and super-segments.
393 <li>oneway = oneway segments.
394 <li>speed = speed limits.
395 <li>weight = weight limits.
396 <li>height = height limits.
397 <li>width = width limits.
398 <li>length = length limits.
402 <dd>Selects a data dumping mode which allows looking at individual items in
403 the databases (specifying 'all' instead of a number dumps all of them).
405 <dt>--node=<node>
406 <dd>Prints the information about the selected node number (internal
407 number, not the node id number in the original source file).
408 <dt>--segment=<segment>
409 <dd>Prints the information about the selected segment number.
410 <dt>--way=<way>
411 <dd>Prints the information about the selected way number (internal
412 number, not the way id number in the original source file).
415 <dd>Dumps the contents of the database as an OSM format XML file, the whole
416 database will be dumped unless the latitude and longitude ranges are
420 <dd>The super segments will not be output.
421 <dt>--latmin=<latmin> --latmax=<latmax>
422 <dd>The range of latitudes to dump the data for.
423 <dt>--lonmin=<lonmin> --lonmax=<lonmax>
424 <dd>The range of longitudes to dump the data for.
429 <i>Note: In version 1.5 of Routino a slim option has been added and at
430 compilation time a separate program called <em>filedumper-slim</em> is created
431 that operates in slim mode. In slim mode the database files are read as needed
432 rather than being mapped into memory.</i>
435 <h3><a name="H_1_1_4"></a>tagmodifier</h3>
437 This program is used to run the tag transformation process on an OSM XML file
441 Usage: tagmodifier [--help]
443 [--tagging=<filename>]
444 [<filename.osm>]
449 <dd>Prints out the help information.
451 <dd>Print progress messages that are suitable for logging to a file; normally
452 an incrementing counter is printed which is more suitable for realtime
453 display than logging.
454 <dt>--tagging=<filename>
455 <dd>The name of the XML file containing the tagging rules (defaults to
456 'tagging.xml' in the current directory).
457 <dt><filename.osm> ...
458 <dd>Specifies the filename to read data from, by default data is read from
466 <!-- Footer Start -->
468 <div class="footer" align="center">
472 © Andrew M. Bishop = <amb "at" gedanken.demon.co.uk>