]> git.openstreetmap.org Git - nominatim.git/blobdiff - utils/export.php
move creation of website scripts to setup script
[nominatim.git] / utils / export.php
index ef55aab27ecb4b48514f782a95af44bcc2e18965..ae18891ea9a4f79c45f935b35788d53300625d83 100644 (file)
@@ -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,