Ported functions for the import of special phrases from php to python.

- the command is now --import-special-phrases
- the output is not an sql file anymore, data are directly imported to the database.
- the little part on the documentation (section data import) has been modified.
This commit is contained in:
AntoJvlt
2021-03-20 18:55:08 +01:00
parent 0d9fe6e49c
commit 17cb59efbd
13 changed files with 445 additions and 40 deletions

3
settings/__init__.py Normal file
View File

@@ -0,0 +1,3 @@
"""
Module for settings
"""

View File

@@ -77,7 +77,7 @@ NOMINATIM_TIGER_DATA_PATH=
NOMINATIM_WIKIPEDIA_DATA_PATH=
# Configuration file for special phrase import.
# When unset, the internal default settings from 'settings/phrase_settings.php'
# When unset, the internal default settings from 'settings/phrase_settings.py'
# are used.
NOMINATIM_PHRASE_CONFIG=

View File

@@ -0,0 +1,26 @@
"""
These settings control the import of special phrases from the wiki.
"""
#class/type combinations to exclude
BLACK_LIST = {
'bounday': [
'administrative'
],
'place': [
'house',
'houses'
]
}
#If a class is in the white list then all types will
#be ignored except the ones given in the list.
#Also use this list to exclude an entire class from
#special phrases.
WHITE_LIST = {
'highway': [
'bus_stop',
'rest_area',
'raceway'
],
'building': []
}