// 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(
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",
);
getCmdOpt($_SERVER['argv'], $aCMDOptions, $aCMDResult, true, true);
+ loadSettings($aCMDResult['project-dir'] ?? getcwd());
+
$aRankmap = array(
'continent' => 1,
'country' => 4,