查看相机高度
viewer.camera.positionCartographic.height
Cesium ion
一个免费的在线切片资源服务器,有地形(terrain)、影像(imagery)、航拍(photogrammetry),栅格/点云(point clouds), 以及三维建筑(3D building)
- Cesium.com 用户名/密码 zw3413/Good@2020
ECEF 坐标系:
地心地固坐标系,Earth-Centered,Earth-Fixed,简称ECEF,地心坐标系
是一种以地心为原点的低估坐标系(也成为地球坐标系),是一种笛卡尔坐标系。原点O(0,0)为地球质心,z轴与地轴平行指向北极点,x轴指向本初子午线与赤道的交点,y轴垂直于xOz平面(即东经90度与赤道的交点)构成右手坐标系。

- Cesium.Cartesian3
相对于ECEF坐标系的坐标,能够通过Cesium.Cartesian3.fromDegrees(longitude,latitude,height,ellipsoid,result),将经纬度及高度,获取到相对于ECEF坐标系的坐标。其中height是距离WGS84椭球的单位为米的高度
数据类型
- 3D Models - 3D Tiles (Point cloud, Terrain)
- 3D Models - 3D gITF
- 3D Capture
- CZML
GLB和gITF
GLB 是gITF格式的二进制形式,用来保存gITF格式的数据。以二进制的形式保存一个三维模型的节点关系,相机,材质,动画和网格等信息,包含了gITF数据的JSON,.bin和images等文件
Cesium支持的矢量格式:
kml
Geojson
CzmlPostgis 和 cesium 使用geojson来进行矢量数据的通信
- Postgis对于geojson数据的串行化和反串行化
select st_geomfromgeojson(JSON(‘{“type”:”Feature”,”properties”:{“name”:”test01”,”gvtype”:0},”geometry”:{“type”:”Point”,”coordinates”:[107.60040500984195,34.82754134227982,0]}}’)->’geometry’)
insert into d3_geometry(id, geometry)
values (‘1’,st_geomfromgeojson(JSON(‘{“type”:”Feature”,”properties”:{“name”:”test01”,”gvtype”:0},”geometry”:{“type”:”Point”,”coordinates”:[107.60040500984195,34.82754134227982,0]}}’)->’geometry’))
select ST_AsGeoJSON(geometry) from d3_geometry
— {“type”:”Point”,”coordinates”:[107.60040501,34.827541342,0]}
- cesium对象与geojson的相互转化