2 @define('CONST_InstallPath', dirname(dirname(__FILE__)));
3 if (file_exists(CONST_InstallPath.'/settings/local.php')) require_once(CONST_InstallPath.'/settings/local.php');
4 if (isset($_GET['debug']) && $_GET['debug']) @define('CONST_Debug', true);
7 @define('CONST_Debug', false);
8 @define('CONST_Database_DSN', 'pgsql://@/nominatim'); // <driver>://<username>:<password>@<host>:<port>/<database>
9 @define('CONST_Database_Web_User', 'www-data');
10 @define('CONST_Max_Word_Frequency', '50000');
11 @define('CONST_Limit_Reindexing', true);
14 @define('CONST_HTTP_Proxy', false);
15 @define('CONST_HTTP_Proxy_Host', 'proxy.mydomain.com');
16 @define('CONST_HTTP_Proxy_Port', '3128');
17 @define('CONST_HTTP_Proxy_Login', '');
18 @define('CONST_HTTP_Proxy_Password', '');
21 @define('CONST_Postgresql_Version', '9.3'); // values: 9.0, ... , 9.4
22 @define('CONST_Postgis_Version', '2.1'); // values: 1.5, 2.0, 2.1
25 @define('CONST_Path_Postgresql_Contrib', '/usr/share/postgresql/'.CONST_Postgresql_Version.'/contrib');
26 @define('CONST_Path_Postgresql_Postgis', CONST_Path_Postgresql_Contrib.'/postgis-'.CONST_Postgis_Version);
27 @define('CONST_Osm2pgsql_Binary', CONST_InstallPath.'/osm2pgsql/osm2pgsql');
28 @define('CONST_Osmosis_Binary', '/usr/bin/osmosis');
29 @define('CONST_Tiger_Data_Path', CONST_BasePath.'/data/tiger');
32 @define('CONST_Osm2pgsql_Flatnode_File', null);
34 // tablespace settings
35 // osm2pgsql caching tables (aka slim mode tables) - update only
36 @define('CONST_Tablespace_Osm2pgsql_Data', false);
37 @define('CONST_Tablespace_Osm2pgsql_Index', false);
38 // osm2pgsql output tables (aka main table) - update only
39 @define('CONST_Tablespace_Place_Data', false);
40 @define('CONST_Tablespace_Place_Index', false);
41 // address computation tables - update only
42 @define('CONST_Tablespace_Address_Data', false);
43 @define('CONST_Tablespace_Address_Index', false);
44 // search tables - needed for lookups
45 @define('CONST_Tablespace_Search_Data', false);
46 @define('CONST_Tablespace_Search_Index', false);
47 // additional data, e.g. TIGER data, type searches - needed for lookups
48 @define('CONST_Tablespace_Aux_Data', false);
49 @define('CONST_Tablespace_Aux_Index', false);
51 // Replication settings
52 @define('CONST_Replication_Url', 'http://planet.openstreetmap.org/replication/minute');
53 @define('CONST_Replication_MaxInterval', '3600');
54 @define('CONST_Replication_Update_Interval', '60'); // How often upstream publishes diffs
55 @define('CONST_Replication_Recheck_Interval', '60'); // How long to sleep if no update found yet
57 // Connection buckets to rate limit people being nasty
58 @define('CONST_ConnectionBucket_MemcacheServerAddress', false);
59 @define('CONST_ConnectionBucket_MemcacheServerPort', 11211);
60 @define('CONST_ConnectionBucket_MaxBlockList', 100);
61 @define('CONST_ConnectionBucket_LeakRate', 1);
62 @define('CONST_ConnectionBucket_BlockLimit', 10);
63 @define('CONST_ConnectionBucket_WaitLimit', 6);
64 @define('CONST_ConnectionBucket_MaxSleeping', 10);
65 @define('CONST_ConnectionBucket_Cost_Reverse', 1);
66 @define('CONST_ConnectionBucket_Cost_Search', 2);
67 @define('CONST_ConnectionBucket_Cost_Details', 3);
68 @define('CONST_ConnectionBucket_Cost_Status', 1);
70 // Override this function to add an adjustment factor to the cost
71 // based on server load. e.g. getBlockingProcesses
72 if (!function_exists('user_busy_cost'))
74 function user_busy_cost()
81 @define('CONST_NoAccessControl', true);
82 @define('CONST_ClosedForIndexing', false);
83 @define('CONST_ClosedForIndexingExceptionIPs', '');
84 @define('CONST_BlockedIPs', '');
85 @define('CONST_BulkUserIPs', '');
86 @define('CONST_BlockMessage', ''); // additional info to show for blocked IPs
88 @define('CONST_Website_BaseURL', 'http://'.php_uname('n').'/');
89 @define('CONST_Tile_Default', 'Mapnik');
91 @define('CONST_Default_Language', false);
92 @define('CONST_Default_Lat', 20.0);
93 @define('CONST_Default_Lon', 0.0);
94 @define('CONST_Default_Zoom', 2);
95 @define('CONST_Map_Tile_URL', 'http://{s}.tile.osm.org/{z}/{x}/{y}.png');
96 @define('CONST_Map_Tile_Attribution', ''); // Set if tile source isn't osm.org
98 @define('CONST_Search_AreaPolygons_Enabled', true);
99 @define('CONST_Search_AreaPolygons', true);
101 @define('CONST_Search_BatchMode', false);
103 @define('CONST_Search_TryDroppedAddressTerms', false);
104 @define('CONST_Search_NameOnlySearchFrequencyThreshold', 500);
105 // If set to true, then reverse order of queries will be tried by default.
106 // When set to false only selected languages alloow reverse search.
107 @define('CONST_Search_ReversePlanForAll', true);
109 @define('CONST_Places_Max_ID_count', 50);
111 // Set to zero to disable polygon output
112 @define('CONST_PolygonOutput_MaximumTypes', 1);
115 @define('CONST_Log_DB', true);
116 @define('CONST_Log_File', false);
117 @define('CONST_Log_File_Format', 'TODO'); // Currently hard coded
118 @define('CONST_Log_File_SearchLog', '');
119 @define('CONST_Log_File_ReverseLog', '');