]> git.openstreetmap.org Git - nominatim.git/blob - settings/defaults.php
Switch to configurable style for osm2pgsql
[nominatim.git] / settings / defaults.php
1 <?php
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);
7
8 // General settings
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_Database_Module_Path', CONST_InstallPath.'/module');
13 @define('CONST_Max_Word_Frequency', '50000');
14 @define('CONST_Limit_Reindexing', true);
15 // Restrict search languages.
16 // Normally Nominatim will include all language variants of name:XX
17 // in the search index. Set this to a comma separated list of language
18 // codes, to restrict import to a subset of languages.
19 // Currently only affects the import of country names and special phrases.
20 @define('CONST_Languages', false);
21 // Rules for normalizing terms for comparison before doing comparisons.
22 // The default is to remove accents and punctuation and to lower-case the
23 // term. Spaces are kept but collapsed to one standard space.
24 @define('CONST_Term_Normalization_Rules', ":: NFD (); [[:Nonspacing Mark:] [:Cf:]] >;  :: lower (); [[:Punctuation:][:Space:]]+ > ' '; :: NFC ();");
25
26 // Set to false to avoid importing extra postcodes for the US.
27 @define('CONST_Use_Extra_US_Postcodes', true);
28 /* Set to true after importing Tiger house number data for the US.
29    Note: The tables must already exist or queries will throw errors.
30          After changing this setting run ./utils/setup --create-functions
31          again. */
32 @define('CONST_Use_US_Tiger_Data', false);
33 /* Set to true after importing other external house number data.
34    Note: the aux tables must already exist or queries will throw errors.
35         After changing this setting run ./utils/setup --create-functions
36         again. */
37 @define('CONST_Use_Aux_Location_data', false);
38
39 // Proxy settings
40 @define('CONST_HTTP_Proxy', false);
41 @define('CONST_HTTP_Proxy_Host', 'proxy.mydomain.com');
42 @define('CONST_HTTP_Proxy_Port', '3128');
43 @define('CONST_HTTP_Proxy_Login', '');
44 @define('CONST_HTTP_Proxy_Password', '');
45
46 // Paths
47 @define('CONST_ExtraDataPath', CONST_BasePath.'/data');
48 @define('CONST_Osm2pgsql_Binary', CONST_InstallPath.'/osm2pgsql/osm2pgsql');
49 @define('CONST_Pyosmium_Binary', '@PYOSMIUM_PATH@');
50 @define('CONST_Tiger_Data_Path', CONST_ExtraDataPath.'/tiger');
51 @define('CONST_Wikipedia_Data_Path', CONST_ExtraDataPath);
52 @define('CONST_Phrase_Config', CONST_BasePath.'/settings/phrase_settings.php');
53 @define('CONST_Address_Level_Config', CONST_BasePath.'/settings/address-levels.json');
54 @define('CONST_Import_Style', CONST_BasePath.'/settings/import-full.style');
55
56 // osm2pgsql settings
57 @define('CONST_Osm2pgsql_Flatnode_File', null);
58
59 // tablespace settings
60 // osm2pgsql caching tables (aka slim mode tables) - update only
61 @define('CONST_Tablespace_Osm2pgsql_Data', false);
62 @define('CONST_Tablespace_Osm2pgsql_Index', false);
63 // osm2pgsql output tables (aka main table) - update only
64 @define('CONST_Tablespace_Place_Data', false);
65 @define('CONST_Tablespace_Place_Index', false);
66 // address computation tables - update only
67 @define('CONST_Tablespace_Address_Data', false);
68 @define('CONST_Tablespace_Address_Index', false);
69 // search tables - needed for lookups
70 @define('CONST_Tablespace_Search_Data', false);
71 @define('CONST_Tablespace_Search_Index', false);
72 // additional data, e.g. TIGER data, type searches - needed for lookups
73 @define('CONST_Tablespace_Aux_Data', false);
74 @define('CONST_Tablespace_Aux_Index', false);
75
76 //// Replication settings
77
78 // Base URL of replication service
79 @define('CONST_Replication_Url', 'https://planet.openstreetmap.org/replication/minute');
80
81 // Maximum size in MB of data to download per batch
82 @define('CONST_Replication_Max_Diff_size', '30');
83 // How long until the service publishes the next diff
84 // (relative to the age of data in the diff).
85 @define('CONST_Replication_Update_Interval', '75');
86 // How long to sleep when no update could be found
87 @define('CONST_Replication_Recheck_Interval', '60');
88
89 // Website settings
90 @define('CONST_NoAccessControl', true);
91
92 @define('CONST_Website_BaseURL', 'http://'.php_uname('n').'/');
93 // Language to assume when none is supplied with the query.
94 // When set to false, the local language (i.e. the name tag without suffix)
95 // will be used.
96 @define('CONST_Default_Language', false);
97 // Appearance of the map in the debug interface.
98 @define('CONST_Default_Lat', 20.0);
99 @define('CONST_Default_Lon', 0.0);
100 @define('CONST_Default_Zoom', 2);
101 @define('CONST_Map_Tile_URL', 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png');
102 @define('CONST_Map_Tile_Attribution', ''); // Set if tile source isn't osm.org
103
104 @define('CONST_Search_AreaPolygons', true);
105
106 @define('CONST_Search_BatchMode', false);
107
108 @define('CONST_Search_NameOnlySearchFrequencyThreshold', 500);
109 // If set to true, then reverse order of queries will be tried by default.
110 // When set to false only selected languages alloow reverse search.
111 @define('CONST_Search_ReversePlanForAll', true);
112
113 // Maximum number of OSM ids that may be queried at once
114 // for the places endpoint.
115 @define('CONST_Places_Max_ID_count', 50);
116
117 // Number of different geometry formats that may be queried in parallel.
118 // Set to zero to disable polygon output.
119 @define('CONST_PolygonOutput_MaximumTypes', 1);
120
121 // Log settings
122 // Set to true to log into new_query_log table.
123 // You should set up a cron job that regularly clears out this table.
124 @define('CONST_Log_DB', false);
125 // Set to a file name to enable logging to a file.
126 @define('CONST_Log_File', false);