Mechanical Edits/Mateusz Konieczny - bot account/retag old style parking conditions in Poland

From OpenStreetMap Wiki
Jump to navigation Jump to search

Page content created as advised on Automated_Edits_code_of_conduct#Document_and_discuss_your_plans.

This edit will retag old style parking conditions in Poland.


I, Mateusz Konieczny using my bot account


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.



Parking lane tagging schemes are complicated already, there is no benefit from multiple tagging schemes being present at once.

Yes, editing objects will edit them, change date of last edit and add entry to history. Negative effects of that are minimal and not important.

On the other hand validation, spot checks and review of bot edits will result in fixing some other issues that would not be spotter otherwise and reduces changes of various mistakes if it would be done manually.


Large enough to make it useful to automate it.


state after a mechanical edit:

Changeset would be described and tagged with tags that mark it as automatic, provide link to discussion approving edit, include link promoting etc


Presented to Polish OSM community at and

Support initially checked and confirmed at Polish Discord channel


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. may have more up to date code version that what is listed on this page

Source code

GPL 3.0 licensed

from osm_bot_abstraction_layer.generic_bot_retagging import run_simple_retagging_task
import hashlib

def edit_element(tags):
    for side in "both", "left", "right":
        tag = 'parking:lane:'+side
        if tags.get(tag) in ("no_parking", "no_standing", "no_stopping"):
            tags['parking:condition:'+side] = tags.pop(tag, None)
    return tags

def main():
    print("bot edit proposed: ")
    print("confusion: ")
    query = """
out body;
out skel qt;
    hashed = hashlib.sha256(query.encode('utf-8')).hexdigest()
        objects_to_consider_query_storage_file='/media/mateusz/OSM_cache/osm_bot_cache/tags_for_retagging_' + hashed + '.osm',
        changeset_comment='migrate old parking lane tagging | migracja starego tagowania parkowania',



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.