Facebook
From Winn, 3 Days ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 39
  1. import csv
  2. import codecs
  3. import pprint
  4. import re
  5. import xml.etree.cElementTree as ET
  6.  
  7. import cerberus
  8.  
  9. import schema
  10.  
  11. OSM_PATH = "map"
  12.  
  13. street_types = []
  14.  
  15. def audit():
  16.     for element in ET.iterparse(OSM_PATH):
  17.         if element.tag == 'way':
  18.             for child in list(children):
  19.                 if child.tag == 'tag':
  20.                     if 'name' in child.attrib['k']:
  21.                         street_types.append('v')
  22.         return street_types
  23.  
  24. audit()