如何解决Google Earth Pro中.kml文件LineStrings截断问题?
Google Earth Pro中KML航线随缩放截断问题
我用Python的simplekml库制作KML文件,用Point标记机场,LineStrings展示航线。生成的KML在Google Earth网页版显示正常,但在Google Earth Pro中,航线会随缩放等级出现截断情况。
我已经尝试调整LineString属性(增大线宽、设置altitudemode为clamptoground、开启tessellate=1),但问题仍未解决,代码如下:
for i in range(len(path)): airport_coords = ( airports_df[airports_df['Code'] == path[i]]['Longitude'].values[0], airports_df[airports_df['Code'] == path[i]]['Latitude'].values[0] ) point = kml.newpoint(name=path[i], coords=[airport_coords]) point.style.iconstyle.icon.href = 'http://www.gstatic.com/mapspro/images/stock/1417-trans-airport.png' point.style.iconstyle.scale = 3 if i > 0: last_coords = ( airports_df[airports_df['Code'] == path[i-1]]['Longitude'].values[0], airports_df[airports_df['Code'] == path[i-1]]['Latitude'].values[0] ) line = kml.newlinestring(name='Line', coords=[last_coords, airport_coords]) line.style.linestyle.width = 3 line.style.linestyle.altitudemode = simplekml.AltitudeMode.clamptoground line.style.linestyle.tessellate = 1 line.style.linestyle.color = simplekml.Color.red
问题示例图
- Google Earth Pro中航线截断:

- Google Earth网页版无截断:

内容的提问来源于stack exchange,提问作者MrManini
相关产品推荐
相关产品推荐

