From: Sarah Hoffmann Date: Tue, 5 Sep 2023 12:29:44 +0000 (+0200) Subject: Merge pull request #3189 from lonvia/add-country-area-restriction X-Git-Tag: v4.3.0~7 X-Git-Url: https://git.openstreetmap.org/nominatim.git/commitdiff_plain/b529e054cf682ad53d16234752df9bbcc85cd396?hp=ce1f4cbbdce29460e0984345996d0d6276e0b0f0 Merge pull request #3189 from lonvia/add-country-area-restriction Implement NOMINATIM_SEARCH_WITHIN_COUNTRIES for Python frontend --- diff --git a/nominatim/tools/exec_utils.py b/nominatim/tools/exec_utils.py index 6fc3f6c9..c742e3e0 100644 --- a/nominatim/tools/exec_utils.py +++ b/nominatim/tools/exec_utils.py @@ -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' diff --git a/osm2pgsql b/osm2pgsql index ea0178e9..415de9ab 160000 --- a/osm2pgsql +++ b/osm2pgsql @@ -1 +1 @@ -Subproject commit ea0178e97d5b69a87a8b9c35210c8be4674e60e6 +Subproject commit 415de9abdf2d003a5c0a0abe8e8fc139acacc2b5 diff --git a/settings/flex-base.lua b/settings/flex-base.lua index fbfb4d54..dc2c12ee 100644 --- a/settings/flex-base.lua +++ b/settings/flex-base.lua @@ -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 = {} }