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]
68 [--max-iterations=<number>]
69 [--tagging=<filename>]
70 [<filename.osm> ...]
75 <dd>Prints out the help information.
76 <dt>--dir=<dirname>
77 <dd>Sets the directory name in which to save the results.
78 Defaults to the current directory.
79 <dt>--prefix=<name>
80 <dd>Sets the filename prefix for the files that are created.
81 Defaults to no prefix.
82 <dt>--sort-ram-size=<size>
83 <dd>Specifies the amount of RAM (in MB) to use for sorting the data. If not
84 specified then 64 MB will be used in slim mode or 256 MB otherwise.
85 <dt>--tmpdir=<dirname>
86 <dd>Specifies the name of the directory to store the temporary disk files. If
87 not specified then it defaults to either the value of the --dir option or the
90 <dd>Parse the input files and store them in a temporary file but don't process
91 the data into a routing database.
93 <dd>Don't read in any files but process the existing temporary file into the
95 <dt>--max-iterations=<number>
96 <dd>The maximum number of iterations to use when generating super-nodes and
97 super-segments. Defaults to 10 which is normally enough.
98 <dt>--tagging=<filename>
99 <dd>Sets the filename containing the list of tagging rules in XML format for
100 the parsing the input files. If the file doesn't exist then dirname, prefix
101 and "profiles.xml" will be combined and used, if that doesn't exist then the
102 file '/usr/local/share/routino/profiles.xml' (or custom installation
103 location) will be used.
104 <dt><filename.osm> ...
105 <dd>Specifies the filename(s) to read data from, by default data is read from
110 <i>Note: In version 1.4 of Routino the --transport, --not-highway and
111 --not-property options have been removed. The same functionality can be
112 achieved by editing the tagging rules file to not output unwwanted data.</i>
115 <i>Note: In version 1.5 of Routino the --slim option has been removed but at
116 compilation time a separate program called <em>planetsplitter-slim</em> is
117 created that operates in slim mode. In slim mode the temporary files and
118 database files are read as needed rather than being mapped into memory. This
119 allows a database size greater than 2 GB on 32-bit machines or usage with little
120 or no virtual memory (e.g. some virtual machines). The penalty for this is that
121 the program takes about four times as long to run.</i>
127 ./planetsplitter --dir=data --prefix=gb great_britain.osm
130 This will generate the output files 'data/gb-nodes.mem', 'data/gb-segments.mem'
131 and 'data/gb-ways.mem'.
134 <h3><a name="H_1_1_2"></a>router</h3>
136 This program performs the calculation of the optimum routes using the database
137 generated by the planetsplitter program.
140 Usage: router [--help | --help-profile | --help-profile-xml |
141 --help-profile-json | --help-profile-perl ]
142 [--dir=<dirname>] [--prefix=<name>]
143 [--profiles=<filename>] [--translations=<filename>]
147 [--output-gpx-track] [--output-gpx-route]
148 [--output-text] [--output-text-all]
150 [--profile=<name>]
151 [--transport=<transport>]
152 [--shortest | --quickest]
153 --lon1=<longitude> --lat1=<latitude>
154 --lon2=<longitude> --lon2=<latitude>
155 [ ... --lon99=<longitude> --lon99=<latitude>]
156 [--highway-<highway>=<preference> ...]
157 [--speed-<highway>=<speed> ...]
158 [--property-<property>=<preference> ...]
160 [--weight=<weight>]
161 [--height=<height>] [--width=<width>] [--length=<length>]
166 <dd>Prints out the help information.
168 <dd>Prints out the selected transport profile (type, speed limits, highway
170 <dt>--help-profile-xml
171 <dd>Prints out all the loaded profiles as an XML file in the same format that
173 <dt>--help-profile-json
174 <dd>Prints out all the loaded profiles in JavaScript Object Notation (JSON)
175 format for use in the interactive webpage.
176 <dt>--help-profile-perl
177 <dd>Prints out all the loaded profiles as a Perl object for use in the router
179 <dt>--dir=<dirname>
180 <dd>Sets the directory name in which to read the local database.
181 Defaults to the current directory.
182 <dt>--prefix=<name>
183 <dd>Sets the filename prefix for the files in the local database.
184 Defaults to no prefix.
185 <dt>--profiles=<filename>
186 <dd>Sets the filename containing the list of routing profiles in XML format.
187 If the file doesn't exist then dirname, prefix and "profiles.xml" will be
188 combined and used, if that doesn't exist then the file
189 '/usr/local/share/routino/profiles.xml' (or custom installation location)
191 <dt>--translations=<filename>
192 <dd>Sets the filename containing the list of translations in XML format for
193 the output files. If the file doesn't exist then dirname, prefix and
194 "translations.xml" will be combined and used, if that doesn't exist then the
195 file '/usr/local/share/routino/translations.xml' (or custom installation
196 location) will be used.
197 <dt>--exact-nodes-only
198 <dd>When processing the specified latitude and longitude points only select
199 the nearest node instead of finding the nearest point within a segment
200 (quicker but less accurate unless the points are already near nodes).
202 <dd>Don't generate any screen output while running (useful for running in a script).
203 <dt>--language=<lang>
204 <dd>Select the language specified from the file of translations. If this
205 option is not given and the file exists then the first language in the file
206 will be used. If this option is not given and no file exists the
207 compiled-in default language (English) will be used.
209 <dt>--output-gpx-track
210 <dt>--output-gpx-route
212 <dt>--output-text-all
213 <dd>Generate the selected output file formats (HTML, GPX track file, GPX route
214 file, plain text route and/or plain text with all nodes). If no output is
215 specified then all are generated, specifying any automatically disables those
218 <dd>Do not generate any output or read in any translations files.
219 <dt>--profile=<name>
220 <dd>Specifies the name of the profile to use.
221 <dt>--transport=<transport>
222 <dd>Select the type of transport to use, <transport> can be set to:
226 <li>wheelchair = Wheelchair
227 <li>bicycle = Bicycle
228 <li>moped = Moped (Small motorbike, limited speed)
229 <li>motorbike = Motorbike
230 <li>motorcar = Motorcar
231 <li>goods = Goods (Small lorry, van)
232 <li>hgv = HGV (Heavy Goods Vehicle - large lorry)
233 <li>psv = PSV (Public Service Vehicle - bus, coach)
235 Defaults to 'motorcar', this option also selects the default profile
236 information if the '--profile' option is not given and a profile matching
237 the transport name is found.
239 <dd>Find the shortest route between the waypoints.
241 <dd>Find the quickest route between the waypoints.
242 <dt>--lon1=<longitude>, --lat1=<latitude>
243 <dt>--lon2=<longitude>, --lat2=<latitude>
244 <dt>... --lon99=<longitude>, --lat99=<latitude>
245 <dd>The location of the waypoints that make up the start, middle and end
246 points of the route. Up to 99 waypoints can be specified and the route will
247 pass through each of the specified ones in sequence. The algorithm will use
248 the closest node or point within a segment that allows the specified traffic
250 <dt>--highway-<highway>=<preference>
251 <dd>Selects the percentage preference for using each particular type of
252 highway. The value of <highway> can be selected from:
254 <li>motorway = Motorway
256 <li>primary = Primary
257 <li>secondary = Secondary
258 <li>tertiary = Tertiary
259 <li>unclassified = Unclassified
260 <li>residential = Residential
261 <li>service = Service
263 <li>cycleway = Cycleway
267 Default value depends on the profile selected by the --transport option.
268 <dt>--speed-<highway>=<speed>
269 <dd>Selects the speed limit in km/hour for each type of highway. Default
270 value depends on the profile selected by the --transport option.
271 <dt>--property-<property>=<preference>
272 <dd>Selects the percentage preference for using each particular highway
274 The value of <property> can be selected from:
276 <li>paved = Paved (suitable for normal wheels)
277 <li>multilane = Multiple lanes
280 <li>footroute = A route marked for foot travel
281 <li>bicycleroute = A route marked for bicycle travel
283 Default value depends on the profile selected by the --transport option.
285 <dd>Selects if the direction of oneway streets are to be obeyed (useful to not
286 obey them when walking). Default value depends on the profile selected by
287 the --transport option.
288 <dt>--weight=<weight>
289 <dd>Specifies the weight of the mode of transport in tonnes; ensures that the
290 weight limit on the highway is not exceeded. Default value depends on the
291 profile selected by the --transport option.
292 <dt>--height=<height>
293 <dd>Specifies the height of the mode of transport in metres; ensures that the
294 height limit on the highway is not exceeded. Default value depends on the
295 profile selected by the --transport option.
296 <dt>--width=<width>
297 <dd>Specifies the width of the mode of transport in metres; ensures that the
298 width limit on the highway is not exceeded. Default value depends on the
299 profile selected by the --transport option.
300 <dt>--length=<length>
301 <dd>Specifies the length of the mode of transport in metres; ensures that the
302 length limit on the highway is not exceeded. Default value depends on the
303 profile selected by the --transport option.
307 <i>Note: In version 1.5 of Routino a slim option has been added and at
308 compilation time a separate program called <em>router-slim</em> is created that
309 operates in slim mode. In slim mode the database files are read as needed
310 rather than being mapped into memory.</i>
313 The meaning of the <preference> parameter in the command line options is
314 slightly different for the highway preferences and the property preferences.
315 For the highway preference consider the choice between two possible highways
316 between the start and finish when looking for the shortest route. If highway A
317 has a preference of 100% and highway B has a preference of 90% then highway A
318 will be chosen even if it is up to 11% longer (100/90 = 111%). For the highway
319 properties each highway either has a particular property or not. If the
320 preference for the property is 60% then a highway with the property has a
321 preference of 77% (sqrt(60%)) and one without has a preference of 63%
322 (sqrt(100-60%)). A highway with the property will be chosen even if it is up to
323 22% longer than one without the property (77/63 = 122%). The overall preference
324 for each highway segment is the product of the preference for the highway type
325 and all of the preferences for the highway properties.
328 Example usage (motorbike journey, scenic route, not very fast):
331 ./router --dir=data --prefix=gb --transport=motorbike --highway-motorway=0 \
332 --highway-trunk=0 --speed-primary=80 --speed-secondary=80 --quickest
335 This will use the files 'data/gb-nodes.mem', 'data/gb-segments.mem' and
336 'data/gb-ways.mem' to find the quickest route by motorbike not using motorways
337 or trunk roads and not exceeding 80 km/hr.
340 <h3><a name="H_1_1_3"></a>filedumper</h3>
342 This program is used to extract statistics from the database, extract particular
343 information for visualisation purposes or for dumping the database contents.
346 Usage: filedumper [--help]
347 [--dir=<dirname>] [--prefix=<name>]
349 [--visualiser --latmin=<latmin> --latmax=<latmax>
350 --lonmin=<lonmin> --lonmax=<lonmax>
351 --data=<data-type>]
352 [--dump [--node=<node> ...]
353 [--segment=<segment> ...]
354 [--way=<way> ...]]
355 [--dump-osm [--no-super]
356 [--latmin=<latmin> --latmax=<latmax>
357 --lonmin=<lonmin> --lonmax=<lonmax>]]
362 <dd>Prints out the help information.
363 <dt>--dir=<dirname>
364 <dd>Sets the directory name in which to read the local database.
365 Defaults to the current directory.
366 <dt>--prefix=<name>
367 <dd>Sets the filename prefix for the files in the local database.
369 <dd>Prints out statistics about the database files.
371 <dd>Selects a data visualiser mode which will output a set of data according
372 to the other parameters below.
374 <dt>--latmin=<latmin> --latmax=<latmax>
375 <dd>The range of latitudes to print the data for.
376 <dt>--lonmin=<lonmin> --lonmax=<lonmax>
377 <dd>The range of longitudes to print the data for.
378 <dt>--data=<data-type>
379 <dd>The type of data to output, <data-type> can be selected from:
381 <li>junctions = segment count at each junction.
382 <li>super = super-node and super-segments.
383 <li>oneway = oneway segments.
384 <li>speed = speed limits.
385 <li>weight = weight limits.
386 <li>height = height limits.
387 <li>width = width limits.
388 <li>length = length limits.
392 <dd>Selects a data dumping mode which allows looking at individual items in
393 the databases (specifying 'all' instead of a number dumps all of them).
395 <dt>--node=<node>
396 <dd>Prints the information about the selected node number (internal
397 number, not the node id number in the original source file).
398 <dt>--segment=<segment>
399 <dd>Prints the information about the selected segment number.
400 <dt>--way=<way>
401 <dd>Prints the information about the selected way number (internal
402 number, not the way id number in the original source file).
405 <dd>Dumps the contents of the database as an OSM format XML file, the whole
406 database will be dumped unless the latitude and longitude ranges are
410 <dd>The super segments will not be output.
411 <dt>--latmin=<latmin> --latmax=<latmax>
412 <dd>The range of latitudes to dump the data for.
413 <dt>--lonmin=<lonmin> --lonmax=<lonmax>
414 <dd>The range of longitudes to dump the data for.
419 <i>Note: In version 1.5 of Routino a slim option has been added and at
420 compilation time a separate program called <em>filedumper-slim</em> is created
421 that operates in slim mode. In slim mode the database files are read as needed
422 rather than being mapped into memory.</i>
425 <h3><a name="H_1_1_4"></a>tagmodifier</h3>
427 This program is used to run the tag transformation process on an OSM XML file
431 Usage: tagmodifier [--help]
432 [--tagging=<filename>]
433 [<filename.osm>]
438 <dd>Prints out the help information.
439 <dt>--tagging=<filename>
440 <dd>The name of the XML file containing the tagging rules (defaults to
441 'tagging.xml' in the current directory).
442 <dt><filename.osm> ...
443 <dd>Specifies the filename to read data from, by default data is read from
451 <!-- Footer Start -->
453 <div class="footer" align="center">
457 © Andrew M. Bishop = <amb "at" gedanken.demon.co.uk>