X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/d43f30903c5be80ee9cebc0f45fb661eb4d8b8db..0947b618085f7d46515a3ec06cab5ed818e8635f:/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; +}