X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/8c3a0efe8b75a06279998e66a932d8a56c483961..b133f2bc4cd5e467ff6ef10124416b1307cfdb62:/utils/export.php?ds=sidebyside diff --git a/utils/export.php b/utils/export.php index ef55aab2..ae18891e 100644 --- a/utils/export.php +++ b/utils/export.php @@ -3,8 +3,8 @@ // from a running nominatim instance as CSV data - require_once(CONST_BasePath.'/lib/init-cmd.php'); - require_once(CONST_BasePath.'/lib/ParameterParser.php'); + require_once(CONST_LibDir.'/init-cmd.php'); + require_once(CONST_LibDir.'/ParameterParser.php'); ini_set('memory_limit', '800M'); $aCMDOptions = array( @@ -21,6 +21,7 @@ array('restrict-to-osm-node', '', 0, 1, 1, 1, 'int', 'Export only objects that are children of this OSM node'), array('restrict-to-osm-way', '', 0, 1, 1, 1, 'int', 'Export only objects that are children of this OSM way'), array('restrict-to-osm-relation', '', 0, 1, 1, 1, 'int', 'Export only objects that are children of this OSM relation'), + array('project-dir', '', 0, 1, 1, 1, 'realpath', 'Base directory of the Nominatim installation (default: .)'), "\nAddress ranks: continent, country, state, county, city, suburb, street, path", 'Additional output types: postcode, placeid (placeid for each object)', "\noutput-format must be a semicolon-separated list of address ranks. Multiple ranks", @@ -30,6 +31,8 @@ ); getCmdOpt($_SERVER['argv'], $aCMDOptions, $aCMDResult, true, true); + loadSettings($aCMDResult['project-dir'] ?? getcwd()); + $aRankmap = array( 'continent' => 1, 'country' => 4,