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);
14 // Set to false to avoid importing extra postcodes for the US.
15 @define('CONST_Use_Extra_US_Postcodes', true);
18 @define('CONST_HTTP_Proxy', false);
19 @define('CONST_HTTP_Proxy_Host', 'proxy.mydomain.com');
20 @define('CONST_HTTP_Proxy_Port', '3128');
21 @define('CONST_HTTP_Proxy_Login', '');
22 @define('CONST_HTTP_Proxy_Password', '');
25 @define('CONST_Osm2pgsql_Binary', CONST_InstallPath.'/osm2pgsql/osm2pgsql');
26 @define('CONST_Osmosis_Binary', '/usr/bin/osmosis');
27 @define('CONST_Tiger_Data_Path', CONST_BasePath.'/data/tiger');
30 @define('CONST_Osm2pgsql_Flatnode_File', null);
32 // tablespace settings
33 // osm2pgsql caching tables (aka slim mode tables) - update only
34 @define('CONST_Tablespace_Osm2pgsql_Data', false);
35 @define('CONST_Tablespace_Osm2pgsql_Index', false);
36 // osm2pgsql output tables (aka main table) - update only
37 @define('CONST_Tablespace_Place_Data', false);
38 @define('CONST_Tablespace_Place_Index', false);
39 // address computation tables - update only
40 @define('CONST_Tablespace_Address_Data', false);
41 @define('CONST_Tablespace_Address_Index', false);
42 // search tables - needed for lookups
43 @define('CONST_Tablespace_Search_Data', false);
44 @define('CONST_Tablespace_Search_Index', false);
45 // additional data, e.g. TIGER data, type searches - needed for lookups
46 @define('CONST_Tablespace_Aux_Data', false);
47 @define('CONST_Tablespace_Aux_Index', false);
49 // Replication settings
50 @define('CONST_Replication_Url', 'http://planet.openstreetmap.org/replication/minute');
51 @define('CONST_Replication_MaxInterval', '3600');
52 @define('CONST_Replication_Update_Interval', '60'); // How often upstream publishes diffs
53 @define('CONST_Replication_Recheck_Interval', '60'); // How long to sleep if no update found yet
55 // Connection buckets to rate limit people being nasty
56 @define('CONST_ConnectionBucket_MemcacheServerAddress', false);
57 @define('CONST_ConnectionBucket_MemcacheServerPort', 11211);
58 @define('CONST_ConnectionBucket_MaxBlockList', 100);
59 @define('CONST_ConnectionBucket_LeakRate', 1);
60 @define('CONST_ConnectionBucket_BlockLimit', 10);
61 @define('CONST_ConnectionBucket_WaitLimit', 6);
62 @define('CONST_ConnectionBucket_MaxSleeping', 10);
63 @define('CONST_ConnectionBucket_Cost_Reverse', 1);
64 @define('CONST_ConnectionBucket_Cost_Search', 2);
65 @define('CONST_ConnectionBucket_Cost_Details', 3);
66 @define('CONST_ConnectionBucket_Cost_Status', 1);
68 // Override this function to add an adjustment factor to the cost
69 // based on server load. e.g. getBlockingProcesses
70 if (!function_exists('user_busy_cost'))
72 function user_busy_cost()
79 @define('CONST_NoAccessControl', true);
80 @define('CONST_BlockedIPs', '');
81 @define('CONST_BulkUserIPs', '');
82 @define('CONST_BlockMessage', ''); // additional info to show for blocked IPs
84 @define('CONST_Website_BaseURL', 'http://'.php_uname('n').'/');
85 // Language to assume when none is supplied with the query.
86 // When set to false, the local language (i.e. the name tag without suffix)
88 @define('CONST_Default_Language', false);
89 // Appearance of the map in the debug interface.
90 @define('CONST_Default_Lat', 20.0);
91 @define('CONST_Default_Lon', 0.0);
92 @define('CONST_Default_Zoom', 2);
93 @define('CONST_Map_Tile_URL', 'http://{s}.tile.osm.org/{z}/{x}/{y}.png');
94 @define('CONST_Map_Tile_Attribution', ''); // Set if tile source isn't osm.org
96 @define('CONST_Search_AreaPolygons', true);
98 @define('CONST_Search_BatchMode', false);
100 @define('CONST_Search_TryDroppedAddressTerms', false);
101 @define('CONST_Search_NameOnlySearchFrequencyThreshold', 500);
102 // If set to true, then reverse order of queries will be tried by default.
103 // When set to false only selected languages alloow reverse search.
104 @define('CONST_Search_ReversePlanForAll', true);
106 // Maximum number of OSM ids that may be queried at once
107 // for the places endpoint.
108 @define('CONST_Places_Max_ID_count', 50);
110 // Number of different geometry formats that may be queried in parallel.
111 // Set to zero to disable polygon output.
112 @define('CONST_PolygonOutput_MaximumTypes', 1);
115 // Set to true to log into new_query_log table.
116 // You should set up a cron job that regularly clears out this table.
117 @define('CONST_Log_DB', false);
118 // Set to a file name to enable logging to a file.
119 @define('CONST_Log_File', false);