Question

I can't for the life of me figure out how to display coordinates from a simplekml file in Google Earth. I'm using a for loop to get coords from a list as such...

for code, label, lat, lon, mm, dte:
    pnt=kml.newpoint(name=label,coords=[(lon, lat)]
    pnt.description='PointA'

But I can't work out the formatting to actually display the coord's for each point. They are strings in the list ie.[['AO1','Hway','-18.5','130.50',3.0,'30_3'],[ ]] so I guess a formatting issue.... any suggestions?

No correct solution

OTHER TIPS

>>> data
[['AO1', 'Hway', '-18.5', '130.50', 3.0, '30_3'], []]

Convert to float:

>>> float(data[0][2])
-18.5
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top