Extract Coordinates from KML BatchGeo File with Python

前端 未结 1 1430
孤独总比滥情好
孤独总比滥情好 2020-12-06 13:40

I\'ve uploaded some addresses to BatchGeo and downloaded the resulting KML file from which I want to extract the coordinates. I managed to prettify the jumbled text file onl

相关标签:
1条回答
  • 2020-12-06 13:49
    from pykml import parser
    
    root = parser.fromstring(open('BatchGeo.kml', 'r').read())
    print root.Document.Placemark.Point.coordinates
    

    see the pykml docs

    hope that helps!

    0 讨论(0)
提交回复
热议问题