Mechanical Edits/Mateusz Konieczny - bot account/remove boundary tagging on ways in Poland/
Page content created as advised on Automated_Edits_code_of_conduct#Document_and_discuss_your_plans.
message via OSM I will respond also to PMs to the bot account, though messaging my main account is preferable as I will get notifications in OSM editors.
English and Polish languages are preferable, for other I need to use an automatic translator.
- without any known benefits
- raising validator warnings in JOSM, Vespucci, Osmose and probably also other QA tools
- that is pointless duplication
Unknown, let me know if it is important to someone.
state after a mechanical edit:
Changeset would be described and tagged with tags that mark it as automatic, provide link to discussion approving edit etc
Discussed by Polish OSM community at https://forum.openstreetmap.org/viewtopic.php?id=71873
Thread specifically about bot edit: https://forum.openstreetmap.org/viewtopic.php?pid=819797#p819797
This is a reoccurring edit and may be made as soon as new tagging like this will appear. At this moment triggering new edit requires human intervention and review so exact schedule is not predictable and bot may stop running at any moment.
GPL 3.0 licensed
from osm_bot_abstraction_layer.generic_bot_retagging import run_simple_retagging_task import osm_bot_abstraction_layer.overpass_downloader as overpass_downloader from osm_iterator.osm_iterator import Data import osm_bot_abstraction_layer.world_data as world_data import time def edit_element(tags): if tags.get('admin_level') != None: return tags if tags.get('boundary') != ("administrative"): return tags tags.pop('boundary', None) return tags def query(area_name): return """ [out:xml][timeout:1000]; area['name'='""" + area_name + """']->.searchArea; rel(area.searchArea)["boundary"="administrative"]["admin_level"]; >; way["boundary"=administrative][!"admin_level"]._; (._;>;); out meta qt;""" def storage_path(filename): return '/tmp/' + filename def edit_part(area_name): run_simple_retagging_task( max_count_of_elements_in_one_changeset=5000, objects_to_consider_query= query(area_name), objects_to_consider_query_storage_file=storage_path('bare_boundary_tags'), is_in_manual_mode=False, changeset_comment='usunięcie zbędnego boundary=administrative z lini, dublującego tagi na relacjach granic', discussion_url='https://forum.openstreetmap.org/viewtopic.php?pid=819797#p819797', osm_wiki_documentation_page='https://wiki.openstreetmap.org/wiki/Mechanical_Edits/Mateusz_Konieczny_-_bot_account/remove_boundary_tagging_on_ways_in_Poland/', edit_element_function=edit_element, ) def main(): #edit_part("Warszawa") #for test run edit_part("Polska") # following turned out to be not needed """ code = "PL" admin_level_of_split = 4 storage_file = storage_path(code+"_area_divisions.osm") for area_name in world_data.list_of_area_divisions(code, admin_level_of_split, storage_file): print(query(area_name)) edit_part(area_name) minutes_sleeping = 3 # to avoid overloading overpass time.sleep(60 * minutes_sleeping) """ main()
Please write at bot approval thread . Note that in case of opt-out exactly the same edit will be made manually for objects where bot opt-out was used.
- User:ZeLonewolf/proposals/Boundary_relation_way_members This proposes that boundary relation member ways are no longer recommended to be tagged with boundary=* or its subordinate tags.