gis - 如何将大地测量位置转换为与 Cesium 中的地形模型一起使用的 ECF 位置

标签 gis geospatial coordinate-systems cesiumjs czml

我试图在 Cesium 中的珠穆朗玛峰顶部放置一个点.截至昨晚,我最有可能的候选者是我借用的代码来进行大地测量到 ecef 的转换(来自 PySatel.coord)。今早复习,似乎是正确的:

a = 6378.137
b = 6356.7523142
esq = 6.69437999014 * 0.001
e1sq = 6.73949674228 * 0.001
f = 1 / 298.257223563


def geodetic2ecef(lat, lon, alt):
    """Convert geodetic coordinates to ECEF.

    Units are degrees and kilometers.
    """
    lat, lon = radians(lat), radians(lon)
    xi = sqrt(1 - esq * sin(lat))
    x = (a / xi + alt) * cos(lat) * cos(lon)
    y = (a / xi + alt) * cos(lat) * sin(lon)
    z = (a / xi * (1 - esq) + alt) * sin(lat)
    return x, y, z

我从维基百科中提取了珠穆朗玛峰的纬度/经度/高度。在我的 CZML 中定位对象之前,我将上述代码提供的 ECF 坐标乘以 1000(m/km)。我得到一个 ECF 位置:[302995.41122130124, 5640733.98308375, 2981975.8695256836]。使用默认地形提供程序(在 tutorial 中描述),这一点明显高于珠穆朗玛峰的顶峰。

这是相关的 CZML 片段:

{"position": 
  {"cartesian": [302995.41122130124, 5640733.98308375, 2981975.8695256836]}, 
 "id": "ellipsoid-1", 
 "ellipsoid": 
   {
     "radii": {"cartesian": [3545.5375159540376, 
                              164.44985193756034, 
                              164.62702908803794]}, 
     "material": {"solidColor": {"color": {"rgba": [0, 255, 0, 100]}}}
   }, 
 "orientation": {"unitQuaternion": [0.00014107125875577922, 
                                    -0.011462389405915903, 
                                    -0.010254110199791062, 
                                    -0.70702315200093502]}
}

最佳答案

这里有几个因素在起作用。

首先,Cesium 用于地形的源数据可能低于预期的珠穆朗玛峰高度。我们使用 CGIAR SRTM 数据集,因此他们常见问题解答中的此项是相关的:

Why do some mountain regions have peaks significantly lower than they should be?

As mentioned earlier, many original data voids are concentrated in mountainous areas and in snow-covered regions. Hence, many peaks in high-mountain areas are actually interpolated. Without using a high resolution co-variable for the interpolation, the interpolation fails to identify that the data void is actually a peak, and tends to “flatten” the peak, leading to underestimates in the true elevation for that region. This issue is largely resolved in Version 4.

他们说它在 v4 中得到了很大程度的解决,Cesium 使用的版本,所以希望第一个因素不是实际问题。

其次,我们对用于 Cesium 的源地形数据的处理可能会使峰值变平一点。这个问题将很快得到纠正,希望在接下来的几个月内。

第三,维基百科提供的高度是高于平均海平面 (MSL) 的高度。 MSL 是一个复杂的表面,很难在数学上处理,所以你的 geodetic2ecef 没有这样做。相反,它与 Cesium 一样,假设高度是相对于 WGS84 椭球的,这是一个更好的表面。

NGA 有一个网站,可用于查找 WGS84 椭球上方的 MSL 高度,也称为大地水准面高度: http://earth-info.nga.mil/GandG/wgs84/gravitymod/egm96/intpt.html

据报道,对于珠穆朗玛峰的顶峰(北纬 27° 59′ 17″,东经 86° 55′ 31″),MSL 低于 WGS84 28.73 米。如果您从维基百科上报告的山峰高度中减去该数字,您至少应该更接近。

此页面包含有关以编程方式计算大地水准面高度的信息: http://earth-info.nga.mil/GandG/wgs84/gravitymod/egm96/egm96.html

我建议对 15 分钟的大地水准面高度文件进行插值,而不是根据系数计算高度。

一些与问题没有直接关系的其他注释:

  • Cesium 具有将 LLA(我们称之为制图)转换为笛卡尔坐标的代码。请参阅 Ellipsoid.cartographicToCartesian
  • 您可以在 CZML 中以 cartographicDegrees 或 cartographicRadians 而非笛卡尔坐标指定坐标,然后 Cesium 会自动为您进行转换。但是,在指定高度时,您仍然需要针对大地水准面进行调整。另外,不要忘记经度在前。

关于gis - 如何将大地测量位置转换为与 Cesium 中的地形模型一起使用的 ECF 位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16299154/

相关文章:

r - 地理热/等高线图空间插值的最佳方法?

algorithm - 在坐标 2D 平原中从点 1 移动到点 2 的方法数

java - 将地球上由 4 个纬度经度坐标给出的区域分割成等距网格?

gis - 如何将坐标转换为纬度和经度?

c# - 如何编辑 mif/mid gis 数据格式?

elasticsearch - 多边形查询中的Elasticsearch点

计算最小外接矩形左下角的坐标和长宽提供的2个矩形

openlayers - 如何将 OpenLayers 3 与 Proj4js 一起使用

python - 用pyproj坐标转换

javascript - openlayers - wms - map 未加载