# ECEF data in quantized mesh tiles could not match the latitude/longitude calculated from tile x/y

**URL:** <https://community.cesium.com/t/ecef-data-in-quantized-mesh-tiles-could-not-match-the-latitude-longitude-calculated-from-tile-x-y/14640>\
**Category:** CesiumJS\
**Created:** [July 30, 2021, 11:45am UTC](https://community.cesium.com/t/ecef-data-in-quantized-mesh-tiles-could-not-match-the-latitude-longitude-calculated-from-tile-x-y/14640 "2021-07-30T11:45:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Quing\_in\_Vancouver](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/quing_in_vancouver/32/5761_2.png) [@Quing\_in\_Vancouver](https://community.cesium.com/u/Quing_in_Vancouver)\
**Post date:** [July 30, 2021, 11:45am UTC](https://community.cesium.com/t/ecef-data-in-quantized-mesh-tiles-could-not-match-the-latitude-longitude-calculated-from-tile-x-y/14640/1 "2021-07-30T11:45:55Z")

</div>

for example,  
we took tile (column 850, row 600, zoom 10) which is longitude 118.828, latitude 29.5352.  
in quantized mesh tiles, we got  
centerX=5295633.3156387117  
centerY=-3119125.5139920237  
centerZ=1699514.1494967942  
it looks like a valid ecef value near surface of earth, and convert to LLA is  
Latitude : 15.55665 deg N  
Longitude : 329.50194 deg E  
Height : -11.1 m

it’s far from the tile’sLLA.  
What did we miss in calculation?

another example data we found also doesnt match [GitHub - bertt/quantized-mesh-tile-cs: A .NET Standard 2.0 library for decoding a quantized mesh tile into vertices](https://github.com/bertt/quantized-mesh-tile-cs)  
Terrain.Tiles.Tests.data.9\_533\_383.terrain, doesnt match centerXYZ  
CenterX == 4492197.38443436  
CenterY == 596134.0874495716  
CenterZ == 4473851.280340988

is centerX,Y,Z ECEF? how to convert them to longitude, latitude correctly.

---

<div class="post-metadata">

**Author:** ![Quing\_in\_Vancouver](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/quing_in_vancouver/32/5761_2.png) [@Quing\_in\_Vancouver](https://community.cesium.com/u/Quing_in_Vancouver)\
**Post date:** [July 31, 2021, 6:16am UTC](https://community.cesium.com/t/ecef-data-in-quantized-mesh-tiles-could-not-match-the-latitude-longitude-calculated-from-tile-x-y/14640/2 "2021-07-31T06:16:28Z")

</div>

following tilexyzoom to LLA formulas in

> <https://github.com/loicgasser/quantized-mesh-tile/blob/master/quantized_mesh_tile/global_geodetic.py>

everything looks perfect now

---

<div class="post-metadata">

**Author:** ![sam.rothstein](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/sam.rothstein/32/6584_2.png) [@sam.rothstein](https://community.cesium.com/u/sam.rothstein)\
**Post date:** [August 2, 2021, 12:42am UTC](https://community.cesium.com/t/ecef-data-in-quantized-mesh-tiles-could-not-match-the-latitude-longitude-calculated-from-tile-x-y/14640/3 "2021-08-02T00:42:22Z")

</div>

@Quing_in_Vancouver

Welcome to the community 🎊 I am happy to hear that you were able to resolve your issue. Thank you for posting your solution in this thread - I will refer other community members to this post if similar issues arise.

Best,  
Sam
