Mechanical Edits/Mateusz Konieczny - bot account/adding wikipedia and wikidata tags based on teryt:simc tags and Wikidata in Poland
Page content created as advised on Automated_Edits_code_of_conduct#Document_and_discuss_your_plans.
Who
I, Mateusz Konieczny using my bot account
contact
message via OSM I will respond also to PMs to the bot account. In both cases I will be notified about incoming PMs via email and notifications in OSM editors.
What
Adding wikipedia=* and wikidata=* tags based on teryt:simc=* tags and part of Wikidata database that was created from Public Domain resources (documents published by Polish government).
Editing is restricted to Poland and it makes no sense to run it anywhere else as teryt:simc code is assigned only to settlements in Poland. In case of interest it is possible to easily adapt code to make similar edits in other regions.
Why
Both teryt:simc=* and Wikidata database describing Polish settlements were imported from official resources published by Polish government. As identifier of settlement assigned by government is stored in both of databases (teryt:simc=* in OSM and https://www.wikidata.org/wiki/Property:P4046 in the Wikidata it is possible to easily link these two databases by adding proper wikipedia=* and wikidata=* tags )
This process is highly tedious and bot making this kind of edit is less likely to make mistakes than a human.
Numbers
Initial run edited around 20k objects.
Ongoing edits depend on how many missing tags appear - depends on editing activity in OSM and Wikidata.
How
- Editing is limited to cases where there is 1:1 relation between OSM element and Wikidata element (wikipedia link will not be added if any OSM element already links this wikipedia article etc)
- Each changeset contains a single region
- After every changeset bot sleeps for one minute
A theoretical example:
state before a mechanical edit:
- place=hamlet
- name=Wielopole
- addr:postcode=66-220
- population=54
- teryt:simc=540911523
state after a mechanical edit:
- place=hamlet
- name=Wielopole
- addr:postcode=66-220
- population=54
- teryt:simc=540911523
- wikipedia=pl:Wielopole (Sieniawa)
- wikidata=Q9373130
Changeset would be described and tagged with tags that mark it as automatic, provide link to discussion approving edit, link repository with source code etc
Discussion
Approved by Polish OSM community at https://forum.openstreetmap.org/viewtopic.php?id=59926
Repetition
This is reoccurring edit and may be made as soon as new matching elements appear. At this moment triggering new edit requires human intervention so exact schedule is not predictable and bot may stop running at any moment.
This can change in a future. If bot is abandoned and does not run, feel free to ping me. If I am unable to run it any more feel free to use my code. Note that it may require going through bot approval process again and that code is on specific license.
https://codeberg.org/matkoniecz/OpenStreetMap_cleanup_scripts/src/branch/master/recurrent_bot_edits may have more up to date code version that what is listed on this page
Opt-out
Please write at https://forum.openstreetmap.org/viewtopic.php?id=59926 .