forked from hans/Nominatim
Merge branch 'master' of github.com:twain47/Nominatim
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
|
||||
// Paths
|
||||
@define('CONST_Path_Postgresql_Contrib', '/usr/share/postgresql/'.CONST_Postgresql_Version.'/contrib');
|
||||
@define('CONST_Path_Postgresql_Postgis', CONST_Path_Postgresql_Contrib.'/postgis-1.5');
|
||||
@define('CONST_Path_Postgresql_Postgis', CONST_Path_Postgresql_Contrib.'/postgis-'.CONST_Postgis_Version);
|
||||
@define('CONST_Osm2pgsql_Binary', CONST_BasePath.'/osm2pgsql/osm2pgsql');
|
||||
@define('CONST_Osmosis_Binary', '/usr/bin/osmosis');
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
{
|
||||
fail('database already exists ('.CONST_Database_DSN.')');
|
||||
}
|
||||
passthruCheckReturn('createdb -E UTF-8 '.$aDSNInfo['database']);
|
||||
passthruCheckReturn('createdb -E UTF-8 -p '.$aDSNInfo['port'].' '.$aDSNInfo['database']);
|
||||
}
|
||||
|
||||
if ($aCMDResult['setup-db'] || $aCMDResult['all'])
|
||||
@@ -114,7 +114,7 @@
|
||||
exit;
|
||||
}
|
||||
|
||||
passthru('createlang plpgsql '.$aDSNInfo['database']);
|
||||
passthru('createlang plpgsql -p '.$aDSNInfo['port'].' '.$aDSNInfo['database']);
|
||||
$pgver = (float) CONST_Postgresql_Version;
|
||||
if ($pgver < 9.1) {
|
||||
pgsqlRunScriptFile(CONST_Path_Postgresql_Contrib.'/hstore.sql');
|
||||
@@ -156,6 +156,7 @@
|
||||
}
|
||||
$osm2pgsql .= ' -lsc -O gazetteer --hstore';
|
||||
$osm2pgsql .= ' -C '.$iCacheMemory;
|
||||
$osm2pgsql .= ' -P '.$aDSNInfo['port'];
|
||||
$osm2pgsql .= ' -d '.$aDSNInfo['database'].' '.$aCMDResult['osm-file'];
|
||||
passthruCheckReturn($osm2pgsql);
|
||||
|
||||
@@ -536,7 +537,7 @@
|
||||
$bDidSomething = true;
|
||||
$sOutputFile = '';
|
||||
if (isset($aCMDResult['index-output'])) $sOutputFile = ' -F '.$aCMDResult['index-output'];
|
||||
$sBaseCmd = CONST_BasePath.'/nominatim/nominatim -i -d '.$aDSNInfo['database'].' -t '.$iInstances.$sOutputFile;
|
||||
$sBaseCmd = CONST_BasePath.'/nominatim/nominatim -i -d '.$aDSNInfo['database'].' -P '.$aDSNInfo['port'].' -t '.$iInstances.$sOutputFile;
|
||||
passthruCheckReturn($sBaseCmd.' -R 4');
|
||||
if (!$aCMDResult['index-noanalyse']) pgsqlRunScript('ANALYSE');
|
||||
passthruCheckReturn($sBaseCmd.' -r 5 -R 25');
|
||||
|
||||
Reference in New Issue
Block a user