$aFilenames = glob(CONST_Tiger_Data_Path.'/*.sql');
info('Found '.count($aFilenames).' SQL files in path '.CONST_Tiger_Data_Path);
- if (empty($aFilenames)) return;
-
+ if (empty($aFilenames)) {
+ warn('Tiger data import selected but no files found in path '.CONST_Tiger_Data_Path);
+ return;
+ }
$sTemplate = file_get_contents(CONST_BasePath.'/sql/tiger_import_start.sql');
$sTemplate = $this->replaceSqlPatterns($sTemplate);
public function index($bIndexNoanalyse)
{
- $sOutputFile = '';
$sBaseCmd = CONST_BasePath.'/nominatim/nominatim.py'
.' -d '.escapeshellarg($this->aDSNInfo['database'])
.' -P '.escapeshellarg($this->aDSNInfo['port'])
- .' -t '.escapeshellarg($this->iInstances.$sOutputFile);
+ .' -t '.escapeshellarg($this->iInstances);
if (!$this->bQuiet) {
$sBaseCmd .= ' -v';
}
$sBasePath = CONST_BasePath.'/sql/functions/';
$sTemplate = file_get_contents($sBasePath.'utils.sql');
$sTemplate .= file_get_contents($sBasePath.'normalization.sql');
+ $sTemplate .= file_get_contents($sBasePath.'ranking.sql');
$sTemplate .= file_get_contents($sBasePath.'importance.sql');
$sTemplate .= file_get_contents($sBasePath.'address_lookup.sql');
$sTemplate .= file_get_contents($sBasePath.'interpolation.sql');