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
""" | |
A script to take all of the LineString information out of a very large KML file. It formats it into a CSV file so | |
that you can import the information into the NDB of Google App Engine using the Python standard library. I ran this | |
script locally to generate the CSV. It processed a ~70 MB KML down to a ~36 MB CSV in about 8 seconds. | |
The KML had coordinates ordered by | |
[Lon, Lat, Alt, ' ', Lon, Lat, Alt, ' ',...] (' ' is a space) | |
The script removes the altitude to put the coordinates in a single CSV row ordered by | |
[Lat,Lon,Lat,Lon,...] |