]> git.openstreetmap.org Git - nominatim.git/blobdiff - nominatim/cli.py
Ported tiger-data-import to python and Added Tarball Support
[nominatim.git] / nominatim / cli.py
index 7459711f9b43dd1c8e370c209d14e6c38989fa6d..e584e9d9889f1e8c3fa86f5594f71d000f35ef1c 100644 (file)
@@ -13,6 +13,7 @@ from .tools.exec_utils import run_legacy_script, run_php_server
 from .errors import UsageError
 from . import clicmd
 from .clicmd.args import NominatimArgs
+from .tools import tiger_data
 
 LOG = logging.getLogger()
 
@@ -166,8 +167,11 @@ class UpdateAddData:
     @staticmethod
     def run(args):
         if args.tiger_data:
-            os.environ['NOMINATIM_TIGER_DATA_PATH'] = args.tiger_data
-            return run_legacy_script('setup.php', '--import-tiger-data', nominatim_env=args)
+            return tiger_data.add_tiger_data(args.config.get_libpq_dsn(),
+                                      args.tiger_data,
+                                      args.threads or 1,
+                                      args.config,
+                                      args.sqllib_dir)
 
         params = ['update.php']
         if args.file: