You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何解决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 Pro中航线截断
  • Google Earth网页版无截断:Google Earth网页版无截断

内容的提问来源于stack exchange,提问作者MrManini

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.24 19:59:53