Created
January 2, 2011 21:15
-
-
Save tdsmith/762821 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/usr/bin/python | |
from BeautifulSoup import BeautifulStoneSoup | |
f = open('VCH Restaurant Data.kml', 'r') | |
buf = f.read() | |
f.close() | |
soup = BeautifulStoneSoup(buf) | |
for placemark in soup.findAll('placemark'): | |
guid = placemark.find('data', {'name': 'Restaurant GUID'}).value.text | |
coordinates = placemark.coordinates.text | |
print '%s\t%s' % (guid, coordinates) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment