# Help with translating lat lon to unreal coords in C++

**URL:** <https://community.cesium.com/t/help-with-translating-lat-lon-to-unreal-coords-in-c/20313>\
**Category:** Cesium for Unreal\
**Created:** [September 9, 2022, 12:57am UTC](https://community.cesium.com/t/help-with-translating-lat-lon-to-unreal-coords-in-c/20313 "2022-09-09T00:57:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![morgankohler](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/morgankohler/32/3476_2.png) [@morgankohler](https://community.cesium.com/u/morgankohler)\
**Post date:** [September 9, 2022, 12:57am UTC](https://community.cesium.com/t/help-with-translating-lat-lon-to-unreal-coords-in-c/20313/1 "2022-09-09T00:57:30Z")

</div>

Hi, I am wondering how to use the C++ API to translate lat lon coordinates to unreal engine coordinates. I am looking for something similar to the “Inaccurate Transform Longitude Latitude Height to Unreal” blueprint function I have seen.

Essentially I want to pass the georeference and a lat lon pair and get the corresponding unreal coordinates. I realize that height must also be passed but maybe there is a way to snap to the terrain height at that point?

Also, I’ve seen references to georeferenced objects instead of translating to unreal coordinates. Maybe this is a better approach? Still would not know how to achieve this in C++ though.

---

<div class="post-metadata">

**Author:** ![peijw](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/peijw/32/9482_2.png) [@peijw](https://community.cesium.com/u/peijw)\
**Post date:** [September 14, 2022, 8:06am UTC](https://community.cesium.com/t/help-with-translating-lat-lon-to-unreal-coords-in-c/20313/2 "2022-09-14T08:06:24Z")

</div>

maybe you need this:  
ACesiumGeoreference\* pGeoreference = ACesiumGeoreference::GetDefaultGeoreference(GetGameWorld());  
FVector tmpFV = pGeoreference-\>InaccurateTransformUnrealToLongitudeLatitudeHeight(VertexPnt);

---

<div class="post-metadata">

**Author:** ![morgankohler](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/morgankohler/32/3476_2.png) [@morgankohler](https://community.cesium.com/u/morgankohler)\
**Post date:** [October 19, 2022, 5:21pm UTC](https://community.cesium.com/t/help-with-translating-lat-lon-to-unreal-coords-in-c/20313/3 "2022-10-19T17:21:49Z")

</div>

Thanks for the help, yes it was as simple as finding the georeference object and using the TransformLongitudeLatitudeHeightToUnreal function
