Mechanical Edits/Mateusz Konieczny - bot account/moving FIXME to fixme 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
Why
fixme=* is a standard way to mark fixmes.
FIXME=* is an unexpected and duplicate way to mark fixme and therefore retagging this duplicate to fixme=* would improve tagging without any information loss.
As result authors of QA tools would not need to discover that there is not only fixme but also its duplicate FIXME tag.
Direct reason
I encountered fixme note not listed in my tool - as it was using FIXME=*.
Numbers
Between 5000 and 6000 objects are expected to be edited. See http://taginfo.openstreetmap.pl/keys/FIXME#map for a geographic distribution.
How
FIXME=* tag would be replaced by fixme=*. Objects where fixme=* is present and not equal to fixme=* would skipped. Objects with other tags with FIXME in name would be skipped (for example source:FIXME=*).
An example ( https://www.openstreetmap.org/node/4725543372 ):
state before a mechanical edit:
state after a mechanical edit:
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. It would include at least
- automatic=yes
- bot=yes
- created_by=osmapi/1.0.2
- discussion_before_edits=https://forum.openstreetmap.org/viewtopic.php?pid=702755
- source_code=link to a github repository
Changeset would be split into small areas to avoid continent-sized bounding boxes. As this tag may be on extremely large objects (for example relations representing long routes) it may be unavoidable to make some edits with very large bounding boxes.
Edits would be generated by an osmapi based program.
Discussion
https://forum.openstreetmap.org/viewtopic.php?pid=702755#
Repetition
Redoing this edit in the future would be treated as a new mechanical edit with a new approval process.
Code
Code is GNU GPLv3 licensed.
from osm_bot_abstraction_layer.generic_bot_retagging import run_simple_retagging_task def is_element_editable(element): if element.get_tag_value('fixme') != None: if element.get_tag_value('fixme') == element.get_tag_value('FIXME'): return True return False return element.get_tag_value('FIXME') != None def edit_element(tags): tags['fixme'] = tags['FIXME'] del tags['FIXME'] return tags # #tags.get('wikipedia') != None #tags['wikipedia'] = expected_wikipedia #tags.pop('opening hours:signed') def main(): run_simple_retagging_task( max_count_of_elements_in_one_changeset = 500, objects_to_consider_query = """ [out:xml][timeout:25]; // fetch area “Małopolska” to search in area[name='Polska']->.searchArea; // gather results ( // query part for: “FIXME=*” node["FIXME"](area.searchArea); way["FIXME"](area.searchArea); relation["FIXME"](area.searchArea); ); // print results out body; """, objects_to_consider_query_storage_file = '/media/mateusz/5bfa9dfc-ed86-4d19-ac36-78df1060707c/OSM-cache/overpass/tags_for_retagging.osm', is_in_manual_mode = False, changeset_comment = "ujednolicanie tagów FIXME=* do fixme=*", discussion_url = "https://forum.openstreetmap.org/viewtopic.php?id=62577", is_element_editable_checker_function = is_element_editable, edit_element_function = edit_element, ) main()
Opt-out
Please comment in the discussion thread (see #Discussion).