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 [--slim] [--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.
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=<size>
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
92 <dt>--tmpdir=<dirname>
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
97 <dd>Parse the input files and store them in a temporary file but don't process
98 the data into a routing database.
100 <dd>Don't read in any files but process the existing temporary file into the
102 <dt>--max-iterations=<number>
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=<filename>
106 <dd>The name of the XML file containing the tagging rules (defaults to
107 'tagging.xml' with '--dirname' and '--prefix' options).
108 <dt><filename.osm> ...
109 <dd>Specifies the filename(s) to read data from, by default data is read from
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>
122 ./planetsplitter --dir=data --prefix=gb great_britain.osm
125 This will generate the output files 'data/gb-nodes.mem', 'data/gb-segments.mem'
126 and 'data/gb-ways.mem'.
129 <h3><a name="H_1_1_2"></a>router</h3>
131 This program performs the calculation of the optimum routes using the database
132 generated by the planetsplitter program.
135 Usage: router [--help | --help-profile | --help-profile-xml |
136 --help-profile-json | --help-profile-perl ]
137 [--dir=<dirname>] [--prefix=<name>]
138 [--profiles=<filename>] [--translations=<filename>]
142 [--output-gpx-track] [--output-gpx-route]
143 [--output-text] [--output-text-all]
145 [--profile=<name>]
146 [--transport=<transport>]
147 [--shortest | --quickest]
148 --lon1=<longitude> --lat1=<latitude>
149 --lon2=<longitude> --lon2=<latitude>
150 [ ... --lon99=<longitude> --lon99=<latitude>]
151 [--highway-<highway>=<preference> ...]
152 [--speed-<highway>=<speed> ...]
153 [--property-<property>=<preference> ...]
155 [--weight=<weight>]
156 [--height=<height>] [--width=<width>] [--length=<length>]
161 <dd>Prints out the help information.
163 <dd>Prints out the selected transport profile (type, speed limits, highway
165 <dt>--help-profile-xml
166 <dd>Prints out all the loaded profiles as an XML file in the same format that
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
174 <dt>--dir=<dirname>
175 <dd>Sets the directory name in which to read the local database.
176 Defaults to the current directory.
177 <dt>--prefix=<name>
178 <dd>Sets the filename prefix for the files in the local database.
179 Defaults to no prefix.
180 <dt>--profiles=<filename>
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=<filename>
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).
195 <dd>Don't generate any screen output while running (useful for running in a script).
196 <dt>--language=<lang>
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.
202 <dt>--output-gpx-track
203 <dt>--output-gpx-route
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
211 <dd>Do not generate any output or read in any translations files.
212 <dt>--profile=<name>
213 <dd>Specifies the name of the profile to use.
214 <dt>--transport=<transport>
215 <dd>Select the type of transport to use, <transport> can be set to:
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)
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.
232 <dd>Find the shortest route between the waypoints.
234 <dd>Find the quickest route between the waypoints.
235 <dt>--lon1=<longitude>, --lat1=<latitude>
236 <dt>--lon2=<longitude>, --lat2=<latitude>
237 <dt>... --lon99=<longitude>, --lat99=<latitude>
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
243 <dt>--highway-<highway>=<preference>
244 <dd>Selects the percentage preference for using each particular type of
245 highway. The value of <highway> can be selected from:
247 <li>motorway = Motorway
249 <li>primary = Primary
250 <li>secondary = Secondary
251 <li>tertiary = Tertiary
252 <li>unclassified = Unclassified
253 <li>residential = Residential
254 <li>service = Service
256 <li>cycleway = Cycleway
260 Default value depends on the profile selected by the --transport option.
261 <dt>--speed-<highway>=<speed>
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-<property>=<preference>
265 <dd>Selects the percentage preference for using each particular highway
267 The value of <property> can be selected from:
269 <li>paved = Paved (suitable for normal wheels)
270 <li>multilane = Multiple lanes
274 Default value depends on the profile selected by the --transport option.
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=<weight>
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=<height>
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=<width>
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=<length>
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.
298 The meaning of the <preference> 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).
311 Example usage (motorbike journey, scenic route, not very fast):
314 ./router --dir=data --prefix=gb --transport=motorbike --highway-motorway=0 \
315 --highway-trunk=0 --speed-primary=80 --speed-secondary=80 --quickest
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.
323 <h3><a name="H_1_1_3"></a>filedumper</h3>
325 This program is used to extract statistics from the database, extract particular
326 information for visualisation purposes or for dumping the database contents.
329 Usage: filedumper [--help]
330 [--dir=<dirname>] [--prefix=<name>]
332 [--visualiser --latmin=<latmin> --latmax=<latmax>
333 --lonmin=<lonmin> --lonmax=<lonmax>
334 --data=<data-type>]
335 [--dump [--node=<node> ...]
336 [--segment=<segment> ...]
337 [--way=<way> ...]]
338 [--dump-osm [--no-super]
339 [--latmin=<latmin> --latmax=<latmax>
340 --lonmin=<lonmin> --lonmax=<lonmax>]]
345 <dd>Prints out the help information.
346 <dt>--dir=<dirname>
347 <dd>Sets the directory name in which to read the local database.
348 Defaults to the current directory.
349 <dt>--prefix=<name>
350 <dd>Sets the filename prefix for the files in the local database.
352 <dd>Prints out statistics about the database files.
354 <dd>Selects a data visualiser mode which will output a set of data according
355 to the other parameters below.
357 <dt>--latmin=<latmin> --latmax=<latmax>
358 <dd>The range of latitudes to print the data for.
359 <dt>--lonmin=<lonmin> --lonmax=<lonmax>
360 <dd>The range of longitudes to print the data for.
361 <dt>--data=<data-type>
362 <dd>The type of data to output, <data-type> can be selected from:
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.
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).
378 <dt>--node=<node>
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=<segment>
382 <dd>Prints the information about the selected segment number.
383 <dt>--way=<way>
384 <dd>Prints the information about the selected way number (internal
385 number, not the way id number in the original source file).
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
393 <dd>The super segments will not be output.
394 <dt>--latmin=<latmin> --latmax=<latmax>
395 <dd>The range of latitudes to dump the data for.
396 <dt>--lonmin=<lonmin> --lonmax=<lonmax>
397 <dd>The range of longitudes to dump the data for.
402 <h3><a name="H_1_1_4"></a>tagmodifier</h3>
404 This program is used to run the tag transformation process on an OSM XML file
408 Usage: tagmodifier [--help]
409 [--tagging=<filename>]
410 [<filename.osm>]
415 <dd>Prints out the help information.
416 <dt>--tagging=<filename>
417 <dd>The name of the XML file containing the tagging rules (defaults to
418 'tagging.xml' in the current directory).
419 <dt><filename.osm> ...
420 <dd>Specifies the filename to read data from, by default data is read from
428 <!-- Footer Start -->
430 <div class="footer" align="center">
434 © Andrew M. Bishop = <amb "at" gedanken.demon.co.uk>