]> git.openstreetmap.org Git - nominatim.git/commitdiff
Merge pull request #3189 from lonvia/add-country-area-restriction
authorSarah Hoffmann <lonvia@denofr.de>
Tue, 5 Sep 2023 12:29:44 +0000 (14:29 +0200)
committerGitHub <noreply@github.com>
Tue, 5 Sep 2023 12:29:44 +0000 (14:29 +0200)
Implement NOMINATIM_SEARCH_WITHIN_COUNTRIES for Python frontend

nominatim/tools/exec_utils.py
osm2pgsql
settings/flex-base.lua

index 6fc3f6c91d88685a3a3cbe37b42733f8a2dd9805..c742e3e0061d1d8778d55c8ab975b52873f3fc91 100644 (file)
@@ -57,6 +57,11 @@ def run_osm2pgsql(options: Mapping[str, Any]) -> None:
         if options['tablespaces'][key]:
             cmd.extend((param, options['tablespaces'][key]))
 
+    if options['tablespaces']['main_data']:
+        env['NOMINATIM_TABLESPACE_PLACE_DATA'] = options['tablespaces']['main_data']
+    if options['tablespaces']['main_index']:
+        env['NOMINATIM_TABLESPACE_PLACE_INDEX'] = options['tablespaces']['main_index']
+
     if options.get('disable_jit', False):
         env['PGOPTIONS'] = '-c jit=off -c max_parallel_workers_per_gather=0'
 
index ea0178e97d5b69a87a8b9c35210c8be4674e60e6..415de9abdf2d003a5c0a0abe8e8fc139acacc2b5 160000 (submodule)
--- a/osm2pgsql
+++ b/osm2pgsql
@@ -1 +1 @@
-Subproject commit ea0178e97d5b69a87a8b9c35210c8be4674e60e6
+Subproject commit 415de9abdf2d003a5c0a0abe8e8fc139acacc2b5
index fbfb4d54620decaf791550ebc76e0302c2792896..dc2c12eef1f2d4bb4f2c67b075376ebcd2f4323c 100644 (file)
@@ -30,6 +30,8 @@ local place_table = osm2pgsql.define_table{
         { column = 'extratags', type = 'hstore' },
         { column = 'geometry', type = 'geometry', projection = 'WGS84', not_null = true },
     },
+    data_tablespace = os.getenv("NOMINATIM_TABLESPACE_PLACE_DATA"),
+    index_tablespace = os.getenv("NOMINATIM_TABLESPACE_PLACE_INDEX"),
     indexes = {}
 }