X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/15a1666f8a1e19c338015fccd502be6cfd5c24df..3c7519444867cd9c6b3003c4c88729df21b8c265:/lib/setup_functions.php diff --git a/lib/setup_functions.php b/lib/setup_functions.php index 5aa5919b..a2287d9b 100755 --- a/lib/setup_functions.php +++ b/lib/setup_functions.php @@ -14,3 +14,24 @@ function checkInFile($sOSMFile) fail('osm-file "' . $aCMDResult['osm-file'] . '" not readable'); } } + +function getOsm2pgsqlBinary() +{ + $sBinary = getSetting('OSM2PGSQL_BINARY'); + if (!$sBinary) { + $sBinary = CONST_InstallDir.'/osm2pgsql/osm2pgsql'; + } + + return $sBinary; +} + +function getImportStyle() +{ + $sStyle = getSetting('IMPORT_STYLE'); + + if (in_array($sStyle, array('admin', 'street', 'address', 'full', 'extratags'))) { + return CONST_DataDir.'/settings/import-'.$sStyle.'.style'; + } + + return $sStyle; +}