3 function checkInFile($sOSMFile)
5 if (!isset($sOSMFile)) {
6 fail('missing --osm-file for data import');
9 if (!file_exists($sOSMFile)) {
10 fail('the path supplied to --osm-file does not exist');
13 if (!is_readable($sOSMFile)) {
14 fail('osm-file "' . $aCMDResult['osm-file'] . '" not readable');
18 function getOsm2pgsqlBinary()
20 $sBinary = getSetting('OSM2PGSQL_BINARY');
22 return $sBinary ? $sBinary : CONST_Default_Osm2pgsql;
25 function getImportStyle()
27 $sStyle = getSetting('IMPORT_STYLE');
29 if (in_array($sStyle, array('admin', 'street', 'address', 'full', 'extratags'))) {
30 return CONST_ConfigDir.'/import-'.$sStyle.'.style';