X-Git-Url: https://git.openstreetmap.org/nominatim.git/blobdiff_plain/0930f6e728a3c325a18dfa3b7a520628f9b1be4c..5581bb67f87b3f509f396454a2a86d10f97a64a7:/utils/setup.php diff --git a/utils/setup.php b/utils/setup.php index ee079a89..14fe675e 100755 --- a/utils/setup.php +++ b/utils/setup.php @@ -33,7 +33,6 @@ array('disable-token-precalc', '', 0, 1, 0, 0, 'bool', 'Disable name precalculation (EXPERT)'), array('import-tiger-data', '', 0, 1, 0, 0, 'bool', 'Import tiger data (not included in \'all\')'), array('calculate-postcodes', '', 0, 1, 0, 0, 'bool', 'Calculate postcode centroids'), - array('create-roads', '', 0, 1, 0, 0, 'bool', ''), array('osmosis-init', '', 0, 1, 0, 0, 'bool', 'Generate default osmosis configuration'), array('index', '', 0, 1, 0, 0, 'bool', 'Index the data'), array('index-noanalyse', '', 0, 1, 0, 0, 'bool', 'Do not perform analyse operations during index (EXPERT)'), @@ -79,11 +78,13 @@ } // Assume we can steal all the cache memory in the box (unless told otherwise) - $iCacheMemory = (isset($aCMDResult['osm2pgsql-cache'])?$aCMDResult['osm2pgsql-cache']:getCacheMemoryMB()); - if ($iCacheMemory > getTotalMemoryMB()) + if (isset($aCMDResult['osm2pgsql-cache'])) + { + $iCacheMemory = $aCMDResult['osm2pgsql-cache']; + } + else { $iCacheMemory = getCacheMemoryMB(); - echo "WARNING: resetting cache memory to $iCacheMemory\n"; } $aDSNInfo = DB::parseDSN(CONST_Database_DSN); @@ -467,35 +468,6 @@ pgsqlRunScript('ANALYSE'); } - if ($aCMDResult['create-roads']) - { - $bDidSomething = true; - - $oDB =& getDB(); - $aDBInstances = array(); - for($i = 0; $i < $iInstances; $i++) - { - $aDBInstances[$i] =& getDB(true); - if (!pg_query($aDBInstances[$i]->connection, 'set enable_bitmapscan = off')) fail(pg_last_error($oDB->connection)); - $sSQL = 'select count(*) from (select insertLocationRoad(partition, place_id, calculated_country_code, geometry) from '; - $sSQL .= 'placex where osm_id % '.$iInstances.' = '.$i.' and rank_search between 26 and 27 and class = \'highway\') as x '; - if ($aCMDResult['verbose']) echo "$sSQL\n"; - if (!pg_send_query($aDBInstances[$i]->connection, $sSQL)) fail(pg_last_error($oDB->connection)); - } - $bAnyBusy = true; - while($bAnyBusy) - { - $bAnyBusy = false; - for($i = 0; $i < $iInstances; $i++) - { - if (pg_connection_busy($aDBInstances[$i]->connection)) $bAnyBusy = true; - } - sleep(1); - echo '.'; - } - echo "\n"; - } - if ($aCMDResult['import-tiger-data']) { $bDidSomething = true; @@ -514,7 +486,7 @@ $aDBInstances[$i] =& getDB(true); } - foreach(glob(CONST_BasePath.'/data/tiger2011/*.sql') as $sFile) + foreach(glob(CONST_Tiger_Data_Path.'/*.sql') as $sFile) { echo $sFile.': '; $hFile = fopen($sFile, "r"); @@ -740,6 +712,7 @@ @symlink(CONST_BasePath.'/website/reverse.php', $sTargetDir.'/reverse.php'); @symlink(CONST_BasePath.'/website/search.php', $sTargetDir.'/search.php'); @symlink(CONST_BasePath.'/website/search.php', $sTargetDir.'/index.php'); + @symlink(CONST_BasePath.'/website/lookup.php', $sTargetDir.'/lookup.php'); @symlink(CONST_BasePath.'/website/deletable.php', $sTargetDir.'/deletable.php'); @symlink(CONST_BasePath.'/website/polygons.php', $sTargetDir.'/polygons.php'); @symlink(CONST_BasePath.'/website/status.php', $sTargetDir.'/status.php');