forked from zerebubuth/openstreetmap-cgimap
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME
70 lines (52 loc) · 2.22 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
CGImap 0.5
==========
Overview
========
CGImap is a C++ implementation of the OpenStreetMap "map" call as an
FCGI process. The rails implementation of the "map" call has a few
problems with memory - it uses a lot of it and there is a leak which
makes it annoying to use in long-running environments, like the main
OSM server.
CGImap attempts to address these memory problems and makes it easier
to optimise the queries, something which is also a bit of a pain to do
in Rails.
Requirements
============
CGImap depends on the following libraries. Versions used during
development are in brackets. Other versions may work, but YMMV.
* libxml2 (2.6.32.dfsg-4ubuntu1)
* libpqxx (???)
* libfcgi (2.4.0-7)
* libboost (???)
If you're running a Debian or Ubuntu system these can be installed
using the following command:
sudo apt-get install libxml2-dev libpqxx-dev libfcgi-dev libboost-dev
The build system used is GNU Make, using pkg-config to provide some of
the flags.
Setup
=====
A sample lighttpd.conf file is provided, which I've been using to
test. No testing has been done with other FCGI servers, but if you
find a problem please report it on the OSM trac.
CGImap expects the following environment variables to be set:
* DB_HOST: Hostname or IP address of the database server.
* DB_NAME: Name of the database.
* DB_USER: Name of the user to connect as.
* DB_PASS: Password of the user to connect as.
Optionally, DB_CHARSET can be set to the connection charset to
use. The default is "utf8".
CGImap requires permissions to SELECT and CREATE TEMPORARY on the
Postgres server. It is recommended that a separate account is created for
CGImap to avoid any possibility of data corruption. Care has been
taken programming CGImap but, as with most C++ applications, there is
the chance of an exploitable flaw leading to complete pwnage.
Acknowledgements
================
CGImap contains code from and is partly based on the following:
* modosmapi (http://code.google.com/p/modosmapi/) by
d40cht and japplebyalis.
* quad_tile.c
(http://svn.openstreetmap.org/sites/rails_port/db/functions/maptile.c)
by TomH.
* GNU CGICC (http://www.gnu.org/software/cgicc/)
by Stephen F. Booth and Sebastien Diaz.