Skip to content

Instantly share code, notes, and snippets.

@nyampire
Created January 21, 2014 01:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nyampire/d16c7f4f03834790be83 to your computer and use it in GitHub Desktop.
Save nyampire/d16c7f4f03834790be83 to your computer and use it in GitHub Desktop.
ogr2osm translation file for Uganda administration boundary. (very rough)
# -*- coding: utf-8 -*-
def filterTags(attrs):
if not attrs:
return
tags = {}
# Tags for every Object
tags.update({'boundary':'administrative'})
tags.update({'admin_level':'2'})
tags.update({'place':'city'})
# name tag from "SUM_REGION" column
if attrs['SUB_REGION']:
tags.update({'name':attrs['SUB_REGION']})
else:
pass
return tags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment