mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
add experimental option for enabling forward dependencies
This commit is contained in:
@@ -148,6 +148,29 @@ Setting this option to 'yes' means that Nominatim skips reindexing of contained
|
|||||||
objects when the area becomes too large.
|
objects when the area becomes too large.
|
||||||
|
|
||||||
|
|
||||||
|
#### NOMINATIM_UPDATE_FORWARD_DEPENDENCIES
|
||||||
|
|
||||||
|
| Summary | |
|
||||||
|
| -------------- | --------------------------------------------------- |
|
||||||
|
| **Description:** | Forward geometry changes to dependet objects |
|
||||||
|
| **Format:** | bool |
|
||||||
|
| **Default:** | no |
|
||||||
|
| **Comment:** | EXPERT ONLY. Must not be enabled after import. |
|
||||||
|
|
||||||
|
The geometry of OSM ways and relations may change when a node that is part
|
||||||
|
of the object is moved around. These changes are not propagated per default.
|
||||||
|
The geometry of ways/relations is only updated the next time that the object
|
||||||
|
itself is touched. When enabling this option, then dependent objects will
|
||||||
|
be marked for update when one of its member objects changes.
|
||||||
|
|
||||||
|
Enabling this option may slow down updates significantly.
|
||||||
|
|
||||||
|
!!! warning
|
||||||
|
If you want to enable this option, it must be set already on import.
|
||||||
|
Do not enable this option on an existing database that was imported with
|
||||||
|
NOMINATIM_UPDATE_FORWARD_DEPENDENCIES=no.
|
||||||
|
Updates will become unusably slow.
|
||||||
|
|
||||||
#### NOMINATIM_LANGUAGES
|
#### NOMINATIM_LANGUAGES
|
||||||
|
|
||||||
| Summary | |
|
| Summary | |
|
||||||
|
|||||||
@@ -187,6 +187,7 @@ class NominatimArgs:
|
|||||||
osm2pgsql_style_path=self.config.config_dir,
|
osm2pgsql_style_path=self.config.config_dir,
|
||||||
threads=self.threads or default_threads,
|
threads=self.threads or default_threads,
|
||||||
dsn=self.config.get_libpq_dsn(),
|
dsn=self.config.get_libpq_dsn(),
|
||||||
|
forward_dependencies=self.config.get_bool('UPDATE_FORWARD_DEPENDENCIES'),
|
||||||
flatnode_file=str(self.config.get_path('FLATNODE_FILE') or ''),
|
flatnode_file=str(self.config.get_path('FLATNODE_FILE') or ''),
|
||||||
tablespaces=dict(slim_data=self.config.TABLESPACE_OSM_DATA,
|
tablespaces=dict(slim_data=self.config.TABLESPACE_OSM_DATA,
|
||||||
slim_index=self.config.TABLESPACE_OSM_INDEX,
|
slim_index=self.config.TABLESPACE_OSM_INDEX,
|
||||||
|
|||||||
@@ -117,7 +117,6 @@ def run_osm2pgsql(options: Mapping[str, Any]) -> None:
|
|||||||
env = get_pg_env(options['dsn'])
|
env = get_pg_env(options['dsn'])
|
||||||
cmd = [str(options['osm2pgsql']),
|
cmd = [str(options['osm2pgsql']),
|
||||||
'--hstore', '--latlon', '--slim',
|
'--hstore', '--latlon', '--slim',
|
||||||
'--with-forward-dependencies', 'false',
|
|
||||||
'--log-progress', 'true',
|
'--log-progress', 'true',
|
||||||
'--number-processes', str(options['threads']),
|
'--number-processes', str(options['threads']),
|
||||||
'--cache', str(options['osm2pgsql_cache']),
|
'--cache', str(options['osm2pgsql_cache']),
|
||||||
@@ -131,14 +130,14 @@ def run_osm2pgsql(options: Mapping[str, Any]) -> None:
|
|||||||
else:
|
else:
|
||||||
cmd.extend(('--output', 'gazetteer'))
|
cmd.extend(('--output', 'gazetteer'))
|
||||||
|
|
||||||
if options['append']:
|
cmd.append('--append' if options['append'] else '--create')
|
||||||
cmd.append('--append')
|
|
||||||
else:
|
|
||||||
cmd.append('--create')
|
|
||||||
|
|
||||||
if options['flatnode_file']:
|
if options['flatnode_file']:
|
||||||
cmd.extend(('--flat-nodes', options['flatnode_file']))
|
cmd.extend(('--flat-nodes', options['flatnode_file']))
|
||||||
|
|
||||||
|
if not options.get('forward_dependencies', False):
|
||||||
|
cmd.extend(('--with-forward-dependencies', 'false'))
|
||||||
|
|
||||||
for key, param in (('slim_data', '--tablespace-slim-data'),
|
for key, param in (('slim_data', '--tablespace-slim-data'),
|
||||||
('slim_index', '--tablespace-slim-index'),
|
('slim_index', '--tablespace-slim-index'),
|
||||||
('main_data', '--tablespace-main-data'),
|
('main_data', '--tablespace-main-data'),
|
||||||
|
|||||||
@@ -33,6 +33,15 @@ NOMINATIM_MAX_WORD_FREQUENCY=50000
|
|||||||
# If true, admin level changes on places with many contained children are blocked.
|
# If true, admin level changes on places with many contained children are blocked.
|
||||||
NOMINATIM_LIMIT_REINDEXING=yes
|
NOMINATIM_LIMIT_REINDEXING=yes
|
||||||
|
|
||||||
|
# When set to 'yes' changes to OSM objects will be propagated to dependent
|
||||||
|
# objects. This means that geometries of way/relations are updated when a
|
||||||
|
# node on a way or a way in a relation changes.
|
||||||
|
# EXPERT ONLY: Use with care. Enabling this option might lead to significantly
|
||||||
|
# more load when updates are applied.
|
||||||
|
# Do not enable this option on an existing database.
|
||||||
|
# The default is to not propagate these changes.
|
||||||
|
NOMINATIM_UPDATE_FORWARD_DEPENDENCIES=no
|
||||||
|
|
||||||
# Restrict search languages.
|
# Restrict search languages.
|
||||||
# Normally Nominatim will include all language variants of name:XX
|
# Normally Nominatim will include all language variants of name:XX
|
||||||
# in the search index. Set this to a comma separated list of language
|
# in the search index. Set this to a comma separated list of language
|
||||||
|
|||||||
Reference in New Issue
Block a user