Skip to main content

LCC for Web Manual · v0.6.3 · Page 28 of 68

LCCObject::prj2Ecef

Converts projection coordinates to ECEF (Earth-Centered, Earth-Fixed) coordinates.

The ellipsoid is WGS84. For projection coordinate system information, refer to the getProjectionCoordinateSystemInfos method.

Version Requirement

SDK v0.4.1+

Engine Support

CesiumJS

API

LCCObject::prj2Ecef(prjCoord: Cesium.Cartesian3, isOffset?: boolean): Cesium.Cartesian3

Parameters

ParameterTypeRequiredDefaultDescription
prjCoordCesium.Cartesian3Yes-Projection coordinates.
isOffsetbooleanNotrueWhether coordinates are offset-based relative to the LCC model's origin.

Return Value

Cesium.Cartesian3 — ECEF world coordinates.

Usage Example

Using Offset Coordinates

let isOffset = true;
let prjCoord = new Cesium.Cartesian3(5, 10, 20);
const worldPos = lccObject.prj2Ecef(prjCoord, isOffset);
console.log('world Pos: ', worldPos);

Using Full Projection Coordinates

const pcsInfos = lccObject.getProjectionCoordinateSystemInfos();
const { epsg, offset } = pcsInfos;
let prjCoord = new Cesium.Cartesian3(5, 10, 20);
prjCoord.x += offset[0];
prjCoord.y += offset[1];
prjCoord.z += offset[2];
const worldPos = lccObject.prj2Ecef(prjCoord, false);
console.log('world Pos: ', worldPos);

Notes

  • This method must be called after the success callback of LCCRender.load() has been triggered.
  • LCCObject::ecef2Prj()
  • LCCObject::getProjectionCoordinateSystemInfos()

XGRIDS documentation, reproduced as published and captured on October 27, 2026. Read this page on docs.xgrids.com

Stuck on a Step?

QRC supports every scanner and software seat it sells. Send us the page you are on and we will walk you through it.

Contact Us
Request a Quote