mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-10-27 19:48:44 +03:00
remove create-road function, no longer used
The road tables are filled during indexing. Fixes #21.
This commit is contained in:
parent
6727c36298
commit
48e0b318f2
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user