2 if (file_exists(CONST_BasePath.'/settings/local.php')) require_once(CONST_BasePath.'/settings/local.php');
3 if (isset($_GET['debug']) && $_GET['debug']) @define('CONST_Debug', true);
6 @define('CONST_Debug', false);
7 @define('CONST_Database_DSN', 'pgsql://@/nominatim'); // <driver>://<username>:<password>@<host>:<port>/<database>
8 @define('CONST_Database_Web_User', 'www-data');
9 @define('CONST_Max_Word_Frequency', '50000');
10 @define('CONST_Limit_Reindexing', true);
13 @define('CONST_Postgresql_Version', '9.1'); // values: 9.0, 9.1, 9.2
14 @define('CONST_Postgis_Version', '1.5'); // values: 1.5, 2.0
17 @define('CONST_Path_Postgresql_Contrib', '/usr/share/postgresql/'.CONST_Postgresql_Version.'/contrib');
18 @define('CONST_Path_Postgresql_Postgis', CONST_Path_Postgresql_Contrib.'/postgis-'.CONST_Postgis_Version);
19 @define('CONST_Osm2pgsql_Binary', CONST_BasePath.'/osm2pgsql/osm2pgsql');
20 @define('CONST_Osmosis_Binary', '/usr/bin/osmosis');
23 @define('CONST_Osm2pgsql_Flatnode_File', null);
25 // tablespace settings
26 // osm2pgsql caching tables (aka slim mode tables) - update only
27 @define('CONST_Tablespace_Osm2pgsql_Data', false);
28 @define('CONST_Tablespace_Osm2pgsql_Index', false);
29 // osm2pgsql output tables (aka main table) - update only
30 @define('CONST_Tablespace_Place_Data', false);
31 @define('CONST_Tablespace_Place_Index', false);
32 // address computation tables - update only
33 @define('CONST_Tablespace_Address_Data', false);
34 @define('CONST_Tablespace_Address_Index', false);
35 // search tables - needed for lookups
36 @define('CONST_Tablespace_Search_Data', false);
37 @define('CONST_Tablespace_Search_Index', false);
38 // additional data, e.g. TIGER data - needed for lookups
39 @define('CONST_Tablespace_Aux_Data', false);
40 @define('CONST_Tablespace_Aux_Index', false);
42 // Replication settings
43 @define('CONST_Replication_Url', 'http://planet.openstreetmap.org/replication/minute');
44 @define('CONST_Replication_MaxInterval', '3600');
45 @define('CONST_Replication_Update_Interval', '60'); // How often upstream publishes diffs
46 @define('CONST_Replication_Recheck_Interval', '60'); // How long to sleep if no update found yet
48 // Connection buckets to rate limit people being nasty
49 @define('CONST_ConnectionBucket_MemcacheServerAddress', false);
50 @define('CONST_ConnectionBucket_MemcacheServerPort', 11211);
51 @define('CONST_ConnectionBucket_MaxBlockList', 100);
52 @define('CONST_ConnectionBucket_LeakRate', 1);
53 @define('CONST_ConnectionBucket_BlockLimit', 10);
54 @define('CONST_ConnectionBucket_WaitLimit', 6);
55 @define('CONST_ConnectionBucket_MaxSleeping', 10);
56 @define('CONST_ConnectionBucket_Cost_Reverse', 1);
57 @define('CONST_ConnectionBucket_Cost_Search', 2);
58 @define('CONST_ConnectionBucket_Cost_Details', 3);
59 @define('CONST_ConnectionBucket_Cost_Status', 1);
61 // Override this function to add an adjustment factor to the cost
62 // based on server load. e.g. getBlockingProcesses
63 if (!function_exists('user_busy_cost'))
65 function user_busy_cost()
72 @define('CONST_NoAccessControl', true);
73 @define('CONST_BlockedIPs', '');
74 @define('CONST_IPBanFile', CONST_BasePath.'/settings/ip_blocks');
75 @define('CONST_WhitelistedIPs', '');
76 @define('CONST_BlockedUserAgents', '');
77 @define('CONST_BlockReverseMaxLoad', 15);
78 @define('CONST_BulkUserIPs', '');
79 @define('CONST_BlockMessage', ''); // additional info to show for blocked IPs
81 @define('CONST_Website_BaseURL', 'http://nominatim.openstreetmap.org/');
82 @define('CONST_Tile_Default', 'Mapnik');
84 @define('CONST_Default_Language', false);
85 @define('CONST_Default_Lat', 20.0);
86 @define('CONST_Default_Lon', 0.0);
87 @define('CONST_Default_Zoom', 2);
89 @define('CONST_Search_AreaPolygons_Enabled', true);
90 @define('CONST_Search_AreaPolygons', true);
92 @define('CONST_Search_BatchMode', false);
94 @define('CONST_Search_TryDroppedAddressTerms', false);
95 @define('CONST_Search_NameOnlySearchFrequencyThreshold', false);
97 // Set to zero to disable polygon output
98 @define('CONST_PolygonOutput_MaximumTypes', 1);
101 @define('CONST_Log_DB', true);
102 @define('CONST_Log_File', false);
103 @define('CONST_Log_File_Format', 'TODO'); // Currently hard coded
104 @define('CONST_Log_File_SearchLog', '');
105 @define('CONST_Log_File_ReverseLog', '');