Create a KML File to Display your GPS Data on Google Earth

Below we show you an example KML file that allows you too display your logged GPS data on Google Earth. For simplicity, we have included two GPS points. First, notice that the ordered pairs are Longitude,Latitude. Notice this is reversed of what we would normally expect, but it is important to note the order . . . Longitude must be put as the first term in the ordered pair. Also notice that the ordered pair of data show up two times in the file. The first is to create the dot, or placemark on the map, and the second list creates the line over your logged path. Now, the challenge for you is to write a python program that takes your log.txt file, which contains simple comma delimited data, lat,lon, and use that to generate a .kml file as shown below.