Skip to content
TREN
Atlıhan Harita

LCC for Web User Manual · API Reference

LCCObject::prj2Ecef

Chapter 06.18 / 07Manual version v0.6.4English

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()

This chapter is from the official XGRIDS user manual. Official source (opens in a new tab) · Updated:

XGRIDS Türkiye

We're With You During Setup and in the Field

Atlıhan Harita provides training and technical support for device setup, firmware updates, software use, and field applications. Send us your question and our specialist will get back to you.

+90 216 546 0804