Skip to content

Instantly share code, notes, and snippets.

@kburnham
Created January 26, 2015 22:48
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 kburnham/d270210d20ec3489eb2d to your computer and use it in GitHub Desktop.
Save kburnham/d270210d20ec3489eb2d to your computer and use it in GitHub Desktop.
def count_tags(filename):
tags = {}
for item, elem in ET.iterparse(filename):
if elem.tag not in tags:
tags[elem.tag] = 1
else:
tags[elem.tag] += 1
return tags
tags = count_tags('austin_texas.osm')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment