Skip to content

Instantly share code, notes, and snippets.

@talllguy
Created November 19, 2014 17:51
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 talllguy/41819516d0e30bab0f43 to your computer and use it in GitHub Desktop.
Save talllguy/41819516d0e30bab0f43 to your computer and use it in GitHub Desktop.
ogr2osm translation for Md. DNR data
'''
MD DNR translate
'''
def filterTags(attrs):
if not attrs:
return
tags = {}
# Changing tag caps
if 'LUNAME' in attrs:
tags['name'] = attrs['LUNAME']
if 'DNRNAME' in attrs:
tags['official_name'] = attrs['DNRNAME']
if 'MANAGEDBY' in attrs:
tags['operator'] = attrs['MANAGEDBY']
if 'Protect' in attrs:
tags['protection_title'] = attrs['Protect']
if 'WEBLINK' in attrs:
tags['website'] = attrs['WEBLINK']
if 'LeisureT' in attrs:
tags['leisure'] = attrs['LeisureT']
if 'ProtClas' in attrs:
tags['protect_class'] = attrs['ProtClas']
tags['boundary'] = attrs['protected_area']
return tags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment