无法在 Google 地球中显示轨迹,但在 Google 地图中工作正常 - 为什么?
回复,
我有一个奇怪的问题...一首曲目拒绝在 Google 地球中显示。它显示距离、海拔等一切信息,但没有可见的轨道线。将其导入谷歌地图效果很好。
基本上,我有一个超过 350k 点的文件。组装时,我按日期分隔曲目,现在尝试将它们合并在一起(通过编辑 KML 文件手动合并)。当我尝试合并具有数千个坐标的地标时,它们似乎停止在 Google 地球中显示;就好像地标(线串)可以包含的坐标数量是有限制的。
文件如下: http://www.upl.co/upload/s4Co0Gc2Q
提前致谢。
Re,
I have this strange problem... one track refuses to show in Google Earth. It displays the distance, elevation, everything, but there are no visible track lines. Importing it into Google Maps works fine.
Basically, I have a file with over 350k points. When assembling it, I separated tracks by dates and am now trying to merge them together (manually, by editing the KML file). It appears that when I try to merge placemarks with thousands of coordinates, they stop displaying in Google Earth; as if there is a limit as to how many coordinates a placemark (linestring) can contain.
Here's the file: http://www.upl.co/upload/s4Co0Gc2Q
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要在线串上使用
元素。这指定是否允许 LineString 跟随地形。要启用曲面细分,高度模式必须为clampToGround 或clampToSeaFloor。非常大的线串应该启用细分,以便它们遵循地球的曲率(否则,它们可能会进入地下并被隐藏)。另一种选择是使用
元素。这是 Google 扩展命名空间中的 KML 扩展,用于修改海拔高度值的呈现方式。此偏移量允许您将整个 LineString 作为一个单元向上或向下移动,而无需修改构成 LineString 的所有单独坐标值。 (虽然 LineString 使用海拔偏移值显示,但原始海拔值保留在 KML 文件中。)单位以米为单位。像这样的东西应该有效。
You need to use the
<tessellate>
element on the linestring. This specifies whether to allow the LineString to follow the terrain. To enable tessellation, the altitude mode must be clampToGround or clampToSeaFloor. Very large LineStrings should enable tessellation so that they follow the curvature of the earth (otherwise, they may go underground and be hidden).The other option is to use the
<gx:altitudeOffset>
element. This is A KML extension, in the Google extension namespace, that modifies how the altitude values are rendered. This offset allows you to move an entire LineString up or down as a unit without modifying all the individual coordinate values that make up the LineString . (Although the LineString is displayed using the altitude offset value, the original altitude values are preserved in the KML file.) Units are in meters.Something like this should work.
我有一个大约 96000 坐标的 LineString,并看到与在 google-earth 中加载 KML 相同的效果,并且看到一切正确,除了 LineString(不显示行),就好像我已经超出了一定的限制一样。
坐标没有高度。我尝试过使用或不使用曲面细分和高度模式clampToGround。
对我来说,解决方案是将 LineString 与 MultiGeometry 分开,将其分成两半就足够了(每个 LineString 现在的坐标少于 64000k)。
I have a LineString with about 96000 coordinates, and see the same effect that I can load the KML in google-earth, and see everything correct, except for the LineString (lines are not displayed), as if I had execeeded a certain limit.
The coordinates do not have an altitude. I tried with and without tesselation and alitudeMode clampToGround.
Solution for me was to split the LineString up with a MultiGeometry, splitting it in half was sufficient (each LineString now has less than 64000k coordinates).