source: subversion/sites/namefinder/README @ 4135

Last change on this file since 4135 was 4132, checked in by david, 12 years ago

Name finder source code, first public release

File size: 3.1 KB
Line 
1Information
2-----------
3
4A general description of the name finder can be found at
5  http://wiki.openstreetmap.org/index.php/Name_finder
6
7Prerequisites
8-------------
9
10You will need
11
12* a MySQL database with UTF-8 support. Structure is in the namefind.sql file
13at the top level alongside this file.
14
15* a PHP5 interpreter
16
17* OpenLayers-2.4. Put the Open layers collection of Javascript files in a directory in www and set the location in the configuratin file (see below). Alternatively these could be dragged in from another server.
18
19* classysql.php. This is a set of classes which does for PHP something
20similar to what Rails does for Ruby. See below. This is supplied.
21
22* the system uses a directory dblog, which needs to be writable by the web server.
23
24Licence
25-------
26
27This program creates and provides access to a name index derived from OpenStreetMap map data.
28Copyright (C) 2007 David Earl - contact details below
29
30This program is free software: you can redistribute it and/or modify
31it under the terms of the GNU General Public License as published by
32the Free Software Foundation, either version 3 of the License, or (at
33your option) any later version.
34
35This program is distributed in the hope that it will be useful, but
36WITHOUT ANY WARRANTY; without even the implied warranty of
37MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
38General Public License for more details.
39
40You should have received a copy of the GNU General Public License
41along with this program (see LICENCE).  If not, see <http://www.gnu.org/licenses/>.
42
43Configuration
44-------------
45
46The index.html file is really a php file in disguise. You will need a
47.htaccess file to set the file types to be processed by PHP. There is
48a template for this (dot.htaccess.template) in www. Copy this to www
49and amend appropriately.
50
51There is a configuraton file for things like the database user name
52and password, location of various bits of the system etc, called
53.config.php. There is a template for this: dot.config.php in www. Copy
54this to .config.php and amend appropriately.
55
56Build the database
57------------------
58
59In production this should really be done to a separate database which
60can then be cleaned and switched over to the production one as the
61process takes a long time. The database can be controlled by havinga
62separate copy of .config in your utils directory instead of a link to
63the central one in www.
64
65Run import .php like this, cd'd to utils
66  php5 import.php planet-070813.osm
67(or whatever you php interpreter is called). Make sure the planet file
68has the date in it, as exported from osm, as this is used to determine
69the date of the index.
70
71You might want to run this as a background job redirecting output to a
72log file. The output starts showing progress reports after a few minutes.
73
74Once the index is complete, the node and segment tables (by far the
75largest) can be deleted before transferring to production.
76
77
78Classysql
79---------
80
81This utility code is a separate project which provides class oriented
82MySQL database facilities to client PHP code. It is separately
83licensed.
84
85David Earl
86www.frankieandshadow.com
87August 2007
Note: See TracBrowser for help on using the repository browser.