Serbian OSM Lint
Serbian OSM Lint is a helper tool to detect and fix various issues on Serbian OSM project. This is achieved by using "checks", where Serbian Lint checks are pre-made.
However, it is not constrained to just Serbian checks on OSM, it is general purpose check framework for OSM!
Support for Windows/Linux/Mac, Python 3.x
Support for Sophox SPARQL queries
extensive configuration support
support for both executing reports on checks and automated/semi-automated OSM editing
fully tested and documented
"check framework" where one can define checks by defining:
- On which entity types check is applicable
- On which maps check is applicable
- Check and fix functions
Serbian OSM Lint will then automatically resolve all dependencies and execute checks and fixes on all entities from a given map.
Current results can be seen at:
If it is not updated for 3 days, contact me!
You should have Python 3.x for Serbian OSM Lint to work.
sudo apt-get install build-essential libxml2-dev libxslt1-dev libboost-python-dev libbz2-dev libz-dev pip install -r requirements.txt
Note that if you are on Windows, you will not be able to install PyOSmium, just remove it from requirements.txt, since Serbian OSM Lint has support for fallback PBF reader.
Open src/configuration.py and adopt as necessary. Default configuration is for reporting.
From root directory, just run and you will get HTML report in
report.htmlat the end:
Running with fixing fixable LINT errors (but without actual committing to OSM), and with report HTML outputted to foo.html:
python src/main.py --fix --dry-run -o foo.html
For list of all options, run with -h:
python src/main.py -h
List of checks
Currently, there are dozens of checks. Here is brief overview of them:
- Checks that name tag exists in entity
- Checks that name tag is in cyrillic
- Checks that there is sr:Latn tag and that it is transliterated from regular name tag
- Checks that there are Wikipedia from Serbian Wikipedia and Wikidata entries
- Checks that Wikipedia and Wikidata entries match
Just go to issues and pick one:) If you can make report less uglier - please go for it:)
If you have idea for additional check(s), feel free to write it and I will surely add it!
Serbian OSM Lint is using nosetests. To execute all tests, go to root directory and run: