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