Mechanical Edits/Mateusz Konieczny - bot account/remove area=yes from buildings 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
Remove area=yes from building=* with exception of building=no - and rerun this edit repeatedly.
Why
area=yes is not necessary on buildings.
Removing it will result in less confusing tagging and bring more clarity to newbies (both newbies in editing raw tags and newbies in using data).
It will also remove some of errors appearing in validator (for example I reinstalled Vespucci and have seen Osmose complaints displayed by default, including complaints about this specific issue).
Removing this with a bot is a bit dubious use of time, but it is much better than doing it manually. Doing it manually is a horrific waste of human time.
Numbers
Depends on how many new matches appear - depends on editing activity in OSM.
How
Each changeset contains a single element or group of close elements to avoid edits spanning across large areas (it is impossible in cases where edited object itself spans very large area)
Changeset would be described and tagged with tags that mark it as automatic, provide link to documentation page etc
Editing is limited to objects in Poland.
state before a mechanical edit:
state after a mechanical edit:
Bot source code
Bot is using https://github.com/matkoniecz/osm_bot_abstraction_layer library, this code is GNU GPLv3 licensed
code for my bots resides in https://codeberg.org/matkoniecz/OpenStreetMap_cleanup_scripts/src/branch/master/recurrent_bot_edits
from osm_bot_abstraction_layer.generic_bot_retagging import run_simple_retagging_task def edit_element(tags): if tags.get('building') in [None, "no"]: return tags if tags.get('area') == "yes": tags.pop("area") return tags def run_edit_in_named_area(area_name, discussion_url, osm_wiki_documentation_page): query = """ [out:xml][timeout:1800]; area[name='""" + area_name + """']->.a; ( way["building"]["building"!="no"]["area"="yes"](area.a); relation["building"]["building"!="no"]["area"="yes"](area.a); ); out body; >; out skel qt; """ run_simple_retagging_task( max_count_of_elements_in_one_changeset=500, objects_to_consider_query=query, cache_folder_filepath='/media/mateusz/OSM_cache/osm_bot_cache', is_in_manual_mode=False, changeset_comment='area tag is not needed on buildings', discussion_url=discussion_url, osm_wiki_documentation_page=osm_wiki_documentation_page, edit_element_function=edit_element, ) def main(): """What you think about mass removing `area=yes` from `building=` objects? except `building=no` yes, not massive improvement but it seems to be marginal improvement for me though I admit that one of main reasons for this is shutting up Osmose (I reinstalled Vespucci and have seen Osmose complaints, including this one) https://osmus.slack.com/archives/C029HV951/p1731786773946349 """ run_edit_in_named_area("United States", discussion_url="https://community.openstreetmap.org/t/proposal-for-repeated-mechanical-edit-removing-area-yes-from-building-objects/122643/2", osm_wiki_documentation_page="https://wiki.openstreetmap.org/wiki/Mechanical_Edits/Mateusz_Konieczny_-_bot_account/remove_area%3Dyes_from_buildings_in_USA") run_edit_in_named_area("Polska", discussion_url="https://community.openstreetmap.org/t/propozycja-automatycznej-edycji-zdjecie-area-yes-z-budynkow/122645", osm_wiki_documentation_page="https://wiki.openstreetmap.org/wiki/Mechanical_Edits/Mateusz_Konieczny_-_bot_account/remove_area%3Dyes_from_buildings_in_Poland") main()
Discussion
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 forum topic where it was discussed .
Note that in case of opt-out exactly the same edit will be made manually.