projection
Members
(inner) world2localMtx
地球上pick到的点坐标转换到图层局部坐标系下
Methods
(static) CalMatrixByZprj(zprj) → {Cesium.Matrix4}
根据zprj配置生成模型矩阵
Examples
// 手动校准
let zprj = {
way: "manual",
x: 0.0,
y: 0.0,
longitudeDegree: 120.0,
latitudeDegree: 32.0,
translate: {
x: 0.0,
y: 0.0,
z: 0.0
},
rotate: {
x: 0.0,
y: 0.0,
z: 0.0
},
scale: {
x: 1.0,
y: 1.0,
z: 1.0
}
}
// 自动校准
let zprj = {
way: "auto",
x: 500742.87,
y: 3351182.95,
epsgId: 4549,
translate: {
x: 0.0,
y: 0.0,
z: 0.0
},
rotate: {
x: 0.0,
y: 0.0,
z: 0.0
},
scale: {
x: 1.0,
y: 1.0,
z: 1.0
}
}
// 不需要校准,只计算平移旋转缩放
let zprj = {
way: "globe",
longitudeDegree: 120.0,
latitudeDegree: 32.0,
translate: {
x: 0.0,
y: 0.0,
z: 0.0
},
rotate: {
x: 0.0,
y: 0.0,
z: 0.0
},
scale: {
x: 1.0,
y: 1.0,
z: 1.0
}
}
Parameters:
Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
zprj |
Object |
Properties
|
Returns:
变换矩阵
- Type
- Cesium.Matrix4
(static) localPos2WorldPos(localPt, tileset) → {Cartesian3}
图层局部坐标系下的点转换成地球上的点
Parameters:
Name | Type | Description |
---|---|---|
localPt |
Cartesian3 | 局部坐标系下的点 |
tileset |
Cesium3DTileset | 要变换到哪个图层的地球坐标 |
Returns:
局部坐标对应的地球坐标
- Type
- Cartesian3
(inner) CoordinateProject(epsgIdFromopt, epsgIdToopt, coordinatesopt) → {array}
坐标系转换: 支持的EpsgId对应投影坐标系有 CGCS2000/WGS_1984_UTM/Xian_1980/Beijing_1954/New_Beijing
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
epsgIdFrom |
Number |
<optional> |
epsgId 形如: 4326 |
epsgIdTo |
Number |
<optional> |
epsgId 形如: 3857 |
coordinates |
array |
<optional> |
坐标 形如: [106,32] |
Returns:
- Type
- array
(inner) GetMatrix4Rotation(matrix4, result) → {Cesium.Matrix3}
假设矩阵是仿射变换,提取旋转矩阵
Parameters:
Name | Type | Description |
---|---|---|
matrix4 |
Cesium.Matrix4 | 原矩阵. |
result |
Cesium.Matrix3 | 提取的变换矩阵. |
Returns:
提取的变换矩阵.
- Type
- Cesium.Matrix3
(inner) getScaleFromMatrix4(matrix4, result) → {Cesium.Cartesian3}
假设矩阵是仿射变换,提取缩放系数
Parameters:
Name | Type | Description |
---|---|---|
matrix4 |
Cesium.Matrix4 | 原矩阵. |
result |
Cesium.Cartesian3 | 提取的缩放系数. |
Returns:
提取的缩放系数.
- Type
- Cesium.Cartesian3
(inner) ProjectToCartesian3(ptProject, epsgId) → {Cartesian3}
投影坐标转球心坐标
Parameters:
Name | Type | Description |
---|---|---|
ptProject |
Cartesian3 | 投影坐标 |
epsgId |
Number | EPSGID |
Returns:
球心坐标
- Type
- Cartesian3
(inner) ProjectToLonlat(ptProject, epsgId) → {Cartesian3}
投影坐标转经纬度
Parameters:
Name | Type | Description |
---|---|---|
ptProject |
Cartesian3 | 投影坐标 |
epsgId |
Number | EPSGID |
Returns:
经纬度
- Type
- Cartesian3