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