Mechanical Edits/Mateusz Konieczny - bot account/fix descriptive names on soccer pitches 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
Removing descriptive names on leisure=pitch + sport=soccer
Why
Descriptive names repeating tags are useless and should be removed.
Numbers
Depends on how many new redirects appear - depends on editing activity in OSM.
How
- Editing is limited to objects with leisure=pitch + sport=soccer tag.
- Editing is limited to objects with name=Boisko or name=boisko tag
- 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
from osm_bot_abstraction_layer.generic_bot_retagging import run_simple_retagging_task def is_element_editable(tag_dictionary, identifier): return False def edit_element(tags): if tags.get('leisure') != ("pitch"): print("unexpected leisure tag value: ", tags.get('leisure')) return tags if tags.get('sport') != ("soccer"): print("unexpected sport tag value: ", tags.get('sport')) return tags if tags.get('name') == ("boisko"): tags.pop('name', None) if tags.get('name') == ("Boisko"): tags.pop('name', None) return tags def main(): run_simple_retagging_task( max_count_of_elements_in_one_changeset=500, objects_to_consider_query=""" [out:xml][timeout:25000]; area[name="Polska"]->.a; ( nwr[name='Boisko'][leisure='pitch'][sport='soccer'](area.a); nwr[name='boisko'][leisure='pitch'][sport='soccer'](area.a); ); out body; out skel qt; """, objects_to_consider_query_storage_file='/media/mateusz/OSM_cache/OSM-cache/overpass/tags_for_retagging_descriptive_atm.osm', is_in_manual_mode=False, changeset_comment='usuwanie nazw opisowych z boisk (name="Boisko" i name="boisko"). Tag name jest dla nazw, nie dla opisywania obiektów.', discussion_url='https://forum.openstreetmap.org/viewtopic.php?pid=747880', osm_wiki_documentation_page='https://wiki.openstreetmap.org/wiki/Mechanical_Edits/Mateusz_Konieczny_-_bot_account/fix_descriptive_names_on_soccer_pitches_in_Poland', edit_element_function=edit_element, ) main()
Discussion
Approved by Polish OSM community at https://forum.openstreetmap.org/viewtopic.php?pid=747880
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?pid=747880 .
See also
- Mechanical Edits/Mateusz Konieczny - bot account/fix descriptive name on ATMs in Poland
- Mechanical Edits/Mateusz Konieczny - bot account/fix descriptive names on soccer pitches in Poland
- Mechanical Edits/Mateusz Konieczny - bot account/remove obvious descriptive names for viewpoints (obvious cases only, not all suspect objects)
- Mechanical Edits/Mateusz Konieczny - bot account/fix descriptive name on allotments in Poland
- Mechanical Edits/Mateusz Konieczny - bot account/fix descriptive names in several obvious cases