The Nominatim Data Analyser is a QA tool used to scan the nominatim database and extract suspect data from it. These data are then presented to mappers through a visual interface so that they can correct them directly.
The repository containing the frontend of the tool can be found there.
Clone this repository by running:
git clone https://github.com/osm-search/Nominatim-Data-Analyser
Then you can compile everything with
python3 setup.py build
Or you can directly compile and install the analyser with
pip install .
Make sure to have a Nominatim database set up on your server. You can change the database DSN by supplying a custom config.yaml file.
Some parts of the analyser are configurable. You can find the default
configuration in src/nominatim_data_analyser/default_config.yaml
. To
modify the configuration create a copy of the file with the modified
values and put it as config.yaml
in the directory where the analyser
is executed.
To set up the frontend, please check the frontend repository.
For the webapp to fetch the data extracted by the analyser, you need to serve the <RulesFolderPath>
defined in analyser/config/config.yaml
of the QA Data Analyser Tool with a web server. It should be accessible through the <WebPrefixPath>
also defined in the configuration of the QA Data Analyser Tool.
Analysis is run with the nominatim-data-analyser tool:
- --execute-all: Executes all QA rules.
- --filter [rules_names…]: Filters some QA rules so they are not executed.
- --execute-one <rule_name>: Executes the given QA rule.
- --config: Set a custom location for the configuration file.
During development you can run the same tool directly from the source tree
after having built everything using the supplied cli.py
.
Pytest is used for the tests and it should be installed:
pip install pytest
To run the tests for the analyser: execute pytest
command at the root folder of the project.
To report some errors in the rule, please follow the CONTRIBUTING.md
An advanced documentation of the tool can be found in the Overview.md file.