From 48e0b318f232d54a9c8bee40a75bf58a037b7281 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Sun, 3 May 2015 19:56:08 +0200 Subject: [PATCH] remove create-road function, no longer used The road tables are filled during indexing. Fixes #21. --- utils/setup.php | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/utils/setup.php b/utils/setup.php index ee079a89..a8f81bbe 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)'), @@ -467,35 +466,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; -- 2.45.2