1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5 Routino documentation - installation
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 : Installation</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 : Installation</h1>
44 <!-- Content Start -->
49 <h2><a name="H_1_1"></a>Compilation</h2>
51 This program has been written to run on Linux, no cross-platform compatibility
52 has been specifically included but on the other hand nothing platform specific
53 has been knowingly included either.
57 Any information on improving the compilation process on anything other than
58 32-bit x86 Linux is welcome.
62 No external libraries are required and the programs are written in standard C
67 To compile the programs just type 'make'.
70 <h2><a name="H_1_2"></a>Installation</h2>
72 After compilation the executable files are copied into the directory
73 <tt>web/bin</tt> and the default XML configuration files are copied into the
74 directory <tt>web/data</tt>. This is in preparation for using the supplied
75 example web pages but is also a useful location to copy the files from for
80 The executable files are called <tt>planetsplitter</tt>, <tt>router</tt> and
81 <tt>filedumper</tt> (also <tt>tagmodifier</tt> for debugging tag modifications).
82 They can be copied to any location and need no special installation environment.
86 The default configuration files are called <tt>profiles.xml</tt>,
87 <tt>tagging.xml</tt> and <tt>translations.xml</tt>. The names of the
88 configuration files can be specified on the command line but by default are also
89 looked for in the directory that contains the routing database.
92 <h2><a name="H_1_3"></a>Example Web Page</h2>
94 The directory <tt>web</tt> contains a set of files that can be used to create a
95 working set of web pages with interfaces to the routing algorithm.
99 The files in the <tt>web</tt> directory will require copying to a location that
100 is accessible by a web server. After copying the files some of them need to be
101 edited; search through the files for lines that contain the words "EDIT THIS"
102 and make appropriate edits. The files that need editing are <tt>paths.pl</tt>
103 (to set the directory paths) and <tt>router.js</tt> and <tt>visualiser.js</tt>
104 to limit the range of the visible map (latitude, longitude and zoom).
107 <h3><a name="H_1_3_1"></a>Configuration of web files</h3>
109 The assumption in this description is that the whole of the directory called
110 <tt>web</tt> is copied into a directory that is accessible by an Apache web
115 <em>This is not a secure configuration but an easy one to configure.</em>
117 <em>Only the directory <tt>www</tt> should be accessible by the web server.</em>
119 <em>Do not use this configuration unmodified in a public web server.</em>
123 The directory structure is as follows:
128 + /bin/ <- The Routino executable files (when compiled).
130 + /data/ <- The Routino database and default configuration
133 + /results/ <- An empty directory to store the results.
135 + /www/ <- The files that must be available to the web
136 | server are below this level.
138 + /openlayers/ <- A directory to hold the OpenLayers scripts.
140 + /routino/ <- The main HTML, Javascript, CSS and CGI files.
142 + /documentation/ <- The HTML version of the Routino documentation.
145 The directory <tt>bin</tt> will be filled by running the compilation process.
146 For a secure installation the <tt>bin</tt> directory should be outside of the
147 web server, the file <tt>www/routino/paths.pl</tt> contains the path to
148 the <tt>bin</tt> directory.
152 The directory <tt>data</tt> must contain the Routino database and is also the
153 default location for the configuration files. The routing database is created
154 by downloading the OSM files for the region of interest and running the
155 planetsplitter program. There is a script in the directory that will download
156 the OSM files and create the required database. The script should be edited to
157 set the names of the files to be downloaded. For a secure installation
158 the <tt>data</tt> directory should be outside of the web server, the
159 file <tt>www/routino/paths.pl</tt> contains the path to the <tt>data</tt>
164 The directory <tt>results</tt> is a temporary directory that it used to hold the
165 GPX and text files generated by the Routino router. The directory must be
166 writable by the web server process since it is the CGI scripts that are run by
167 the web server that writes the results here. For a secure installation
168 the <tt>results</tt> directory should be outside of the web server, the file
169 <tt>www/routino/paths.pl</tt> contains the path to the <tt>results</tt> directory.
173 The directory <tt>www</tt> and its sub-directories are the only ones that need
174 to be within the web server accessible directory.
178 The directory <tt>www/openlayers</tt> must be filled with the openlayers
179 Javascript library that can be downloaded from http://www.openlayers.org/.
180 (This version of Routino has been tested with OpenLayers library version 2.9.1).
181 The files must be installed so that the file <tt>www/openlayers/OpenLayers.js</tt>
182 and the directories <tt>www/openlayers/img/</tt>, <tt>www/openlayers/theme/</tt>
183 all exist. There is a script in the directory that will automatically download
184 the files, create an optimised "OpenLayers.js" and copy the files to the required
189 The directory <tt>www/routino</tt> contains the main HTML, Javascript and CSS
190 files as well as the CGI scripts that perform the server-side routing functions.
191 The description below lists all of the files that contain editable information.
195 <dd>This contains the names of the directories that contain the executable
196 files, router database and temporary results.
198 <dd>This file contains the filename prefix for the routing database files
199 (only needed if planetsplitter is run with the --prefix option).
201 <dd>The parameters in this file control the boundary of the visible map
202 (defaults to UK), the minimum and maximum zoom levels (defaults to between
203 4 and 15 inclusive) and the source of map tiles (defaults to the main
204 OpenStreetMap tile server).
206 <dd>The same parameters as in router.js are in this file.
211 The directory <tt>www/routino/documentation</tt> contains the HTML version of
212 the Routino documentation.
215 <h3><a name="H_1_3_2"></a>Configuration of web server</h3>
217 The file <tt>www/routino/.htaccess</tt> contains all of the Apache configuration
218 options that are required to get the example web pages running. The only
219 problem is that because of the way that the <tt>AllowOverride</tt> option works
220 one of the configuration options has been commented out. This must be enabled
221 in the main Apache server configuration file.
228 <!-- Footer Start -->
230 <div class="footer" align="center">
234 © Andrew M. Bishop = <amb "at" gedanken.demon.co.uk>