# How to transforme Window Coordinate to WGS84 ?

**URL:** <https://community.cesium.com/t/how-to-transforme-window-coordinate-to-wgs84/4307>\
**Category:** CesiumJS\
**Created:** [July 1, 2016, 3:18pm UTC](https://community.cesium.com/t/how-to-transforme-window-coordinate-to-wgs84/4307 "2016-07-01T15:18:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![feng\_lin](https://avatars.discourse-cdn.com/v4/letter/f/e9bcb4/32.png) [@feng\_lin](https://community.cesium.com/u/feng_lin)\
**Post date:** [July 1, 2016, 3:18pm UTC](https://community.cesium.com/t/how-to-transforme-window-coordinate-to-wgs84/4307/1 "2016-07-01T15:18:30Z")

</div>

How can I transform Window Coordinate(Cartesian2) to WGS84 (world Cartesian3) coordinates?

---

<div class="post-metadata">

**Author:** ![hannah](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/hannah/32/4509_2.png) [@hannah](https://community.cesium.com/u/hannah)\
**Post date:** [July 1, 2016, 5:15pm UTC](https://community.cesium.com/t/how-to-transforme-window-coordinate-to-wgs84/4307/2 "2016-07-01T17:15:00Z")

</div>

Hello,

Please see our picking demo: [http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Picking.html&label=All](http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Picking.html&label=All)

You can use  
var cartesain3Position = viewer.camera.pickEllipsoid(cartesian2ClickPosition);

``

to get the Cartesian3 position on the ellipsoid where you clicked. I think it will return undefined if you click in space.

Best,

Hannah

---

<div class="post-metadata">

**Author:** ![feng\_lin](https://avatars.discourse-cdn.com/v4/letter/f/e9bcb4/32.png) [@feng\_lin](https://community.cesium.com/u/feng_lin)\
**Post date:** [July 1, 2016, 11:41pm UTC](https://community.cesium.com/t/how-to-transforme-window-coordinate-to-wgs84/4307/3 "2016-07-01T23:41:40Z")

</div>

Thank you for your reply!

Because I want to achieve a measurement height function, so I need to get the  
Cartesian3 position anywhere, including clicks in space. Is there a function similar  
to that of OpenGL gluUnProject？

---

<div class="post-metadata">

**Author:** ![hannah](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/hannah/32/4509_2.png) [@hannah](https://community.cesium.com/u/hannah)\
**Post date:** [July 5, 2016, 12:45pm UTC](https://community.cesium.com/t/how-to-transforme-window-coordinate-to-wgs84/4307/4 "2016-07-05T12:45:50Z")

</div>

You’ll have to implement your own algorithm for clicking in space. We don’t have a calculation for that because there are infinitely many different points to which that mouse position could point to in 3D space.

-Hannah
