LCCObject::ecef2Prj
Converts ECEF (Earth-Centered, Earth-Fixed) coordinates to the projection coordinate system of the LCC model.
The ECEF ellipsoid is WGS84. For projection coordinate system information of the LCC model, refer to the getProjectionCoordinateSystemInfos method.
Version Requirement
SDK v0.4.1+
Engine Support
CesiumJS
API
LCCObject::ecef2Prj(ecefCoord: Cesium.Cartesian3): Cesium.Cartesian3
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
ecefCoord | Cesium.Cartesian3 | Yes | - | ECEF coordinates. |
Return Value
Cesium.Cartesian3 — Projection coordinates.
Usage Example
const pcsInfos = lccObject.getProjectionCoordinateSystemInfos();
const { epsg, offset } = pcsInfos;
const ecefCoord = Cesium.Cartesian3.fromDegrees(116.3976, 39.9055, 10);
const prjPos = lccObject.ecef2Prj(ecefCoord);
console.log('prj Pos: ', prjPos);
Notes
- This method must be called after the success callback of
LCCRender.load()has been triggered.
Related APIs
LCCObject::prj2Ecef()LCCObject::getProjectionCoordinateSystemInfos()