This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def translateAttributes(attrs): | |
if not attrs: return | |
tags = {} | |
# Use the "NOM_ACT" attribute as the name= tag | |
if attrs['NAME1']: | |
tags = {'name':attrs['NAME1']} | |
# If the name contains an hyphen, set it to the ref= tag too | |
if attrs['NAME1'].find('-') != -1: | |
tags.update({'ref':attrs['NAME1']}) | |
tags.update({'boundary':'administrative'}) | |
# egyptian governates are admin_level three: http://wiki.openstreetmap.org/wiki/Tag:boundary=administrative | |
tags.update({'admin_level':'3'}) | |
return tags |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment