Created
November 19, 2014 17:51
-
-
Save talllguy/41819516d0e30bab0f43 to your computer and use it in GitHub Desktop.
ogr2osm translation for Md. DNR data
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
''' | |
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