Simple script to bulk add non redundant tags on boundary=administrative ways
Posted by capiscuas on 22 April 2018 in English. Last updated on 24 April 2018.Sometimes we find in some cities/countries some boundary ways (the ones that define the political borders of provinces/towns/countries) that are missing some tag(not appearing already in the relations, because it’s better to avoid redundant data.
Example of boundary way without any tag:

For the renders and 3rd party apps that is not a big problem because that way is indide the the corresponding relations with different admin_level, it can be shared by one or many relations, but what happens if we need to add a tag to those ways based on the data from their relations?
The script is the following, based on Dmitri Lebedev’s osm2python library (not python3 compatible yet, help migrating).


Boundary RW03 duplicates way with RW06