我创建了一个示例 kml,其中有两个方向相同的多边形。但是在谷歌地球中,一个比另一个更暗,它显示了错误的方向。
这是一个示例 kml 文件。
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Document>
<name>KmlFile</name>
<Placemark>
<name>Shell Polygons</name>
<MultiGeometry>
<Polygon>
<altitudeMode>relativeToGround</altitudeMode>
<outerBoundaryIs>
<LinearRing>
<coordinates>
-1.46794286722133,53.38399869052405,0.9 -1.46794286722724,53.38399869050928,6.720900000000001 -1.46802203110511,53.38399869049681,3 -1.46794286722133,53.38399869052405,0.9
</coordinates>
</LinearRing>
</outerBoundaryIs>
</Polygon>
<Polygon>
<altitudeMode>relativeToGround</altitudeMode>
<outerBoundaryIs>
<LinearRing>
<coordinates>
-1.46802203110511,53.38399869049681,3 -1.46794286722724,53.38399869050928,6.720900000000001 -1.46802203106645,53.38399869048823,6.392399999999999 -1.46802203110511,53.38399869049681,3
</coordinates>
</LinearRing>
</outerBoundaryIs>
</Polygon>
</MultiGeometry>
</Placemark>
</Document>
</kml>
根据坐标,我们可以得到它们的法线(通过叉积), 1.27245E-10,-0.000460805,-1.17167E-15 和 7.40792E-11,-0.000268555,-6.81175E-16 ,然后点积它们,得到 1.23752E-07 > 0。但是 kml 被渲染为一个比另一个更暗。
我的 kml 文件有问题吗?或者这真的是谷歌地球的问题吗?
任何回复将不胜感激。