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?

没有正确的解决方案

其他提示

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

Convert to float:

>>> float(data[0][2])
-18.5
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top