mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-12-23 13:06:15 +03:00
add switch for osm2pgsql cache size
also increased the default to 15GB to accaommodate growing planet
This commit is contained in:
parent
625b1cd17d
commit
3f8fcd4055
@ -18,6 +18,7 @@
|
||||
array('create-db', '', 0, 1, 0, 0, 'bool', 'Create nominatim db'),
|
||||
array('setup-db', '', 0, 1, 0, 0, 'bool', 'Build a blank nominatim db'),
|
||||
array('import-data', '', 0, 1, 0, 0, 'bool', 'Import a osm file'),
|
||||
array('osm2pgsql-cache', '', 0, 1, 1, 1, 'int', 'Cache size used by osm2pgsql'),
|
||||
array('create-functions', '', 0, 1, 0, 0, 'bool', 'Create functions'),
|
||||
array('create-minimal-tables', '', 0, 1, 0, 0, 'bool', 'Create minimal main tables'),
|
||||
array('create-tables', '', 0, 1, 0, 0, 'bool', 'Create main tables'),
|
||||
@ -107,7 +108,17 @@
|
||||
|
||||
$osm2pgsql = CONST_Osm2pgsql_Binary;
|
||||
if (!file_exists($osm2pgsql)) fail("please download and build osm2pgsql");
|
||||
passthru($osm2pgsql.' -lsc -O gazetteer -C 12000 --hstore -d '.$aDSNInfo['database'].' '.$aCMDResult['osm-file']);
|
||||
$osm2pgsql .= ' -lsc -O gazetteer --hstore';
|
||||
if (isset($aCMDResult['osm2pgsql-cache']))
|
||||
{
|
||||
$osm2pgsql .= ' -C '.$aCMDResult['osm2pgsql-cache'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$osm2pgsql .= ' -C 15000';
|
||||
}
|
||||
$osm2pgsql .= ' -d '.$aDSNInfo['database'].' '.$aCMDResult['osm-file'];
|
||||
passthru($osm2pgsql);
|
||||
|
||||
$oDB =& getDB();
|
||||
$x = $oDB->getRow('select * from place limit 1');
|
||||
|
Loading…
Reference in New Issue
Block a user