虚幻Cesium中将经纬度坐标转换为笛卡尔坐标
时间: 2023-09-21 09:11:44 浏览: 124
在虚幻Cesium中,可以使用经纬度坐标转换为笛卡尔坐标。根据引用和引用中的资源包,可以了解到如何执行这个转换过程。在Cesium中,可以使用以下代码来实现经纬度坐标转换为笛卡尔坐标:
```javascript
var cartographic = Cesium.Cartographic.fromDegrees(longitude, latitude, height);
var cartesian = Cesium.Ellipsoid.WGS84.cartographicToCartesian(cartographic);
```
其中,`longitude`代表经度,`latitude`代表纬度,`height`代表高度(可选)。通过`Cesium.Cartographic.fromDegrees`将经纬度转换为地理坐标对象`cartographic`,然后使用`Cesium.Ellipsoid.WGS84.cartographic***9074647400,116.3912822800)转换为笛卡尔坐标,可以使用以下代码:
```javascript
var longitude = 116.3912822800;
var latitude = 39.9074647400;
var cartographic = Cesium.Cartographic.fromDegrees(longitude, latitude);
var cartesian = Cesium.Ellipsoid.WGS84.cartographicToCartesian(cartographic);
console.***<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [73.(cesium篇)cesium笛卡尔坐标(世界坐标)与经纬度坐标转换.zip](https://download.csdn.net/download/m0_60387551/85211808)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [74.(cesium篇)cesium弧度坐标与经纬度坐标转换.zip](https://download.csdn.net/download/m0_60387551/85217940)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [Cesium-经纬度转换笛卡尔坐标系](https://blog.csdn.net/qq_36368339/article/details/105100346)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文