Cesium, coordinates and Unreal Engine

Good morning,

I am using Cesium for Unreal for the creation of a city Digital Twin. I have obtained some building locations which I have imported in Unreal Engine as a data table and used an actor to spawn cylinders as placeholder items to view the locations of those coordinates. I have set up my Cesium within Unreal correctly and overlayed OSM Buildings as well.
However, when I run the game, those placeholder cylinders are shown as positioned in the environment
image

But not shown on my runtime viewport

This image should have some cylinders with a transparent materials applied.
Please advise.

Further to my previous post, I managed to load the cylinders. However, all cylinders are placed within the same location instead of scattered around… I believe it has to do with multiplying and how Cesium treats units within Unreal Engine.

Hi @R4ko0n! What method are you using to place the cylinders at their coordinates? The recommended method is attaching a UCesiumGlobeAnchorComponent to your cylinders with the coordinates set on the component, but you can also try using the TransformLongitudeLatitudeHeightPositionToUnreal method on an ACesiumGeoreference to get the right Unreal coordinates to position them at.

Hi @azrogers thank you for your response. Here is my Blueprint:

I am getting the coordinates from a data table and have tried different options (with a separate actor to include the cylinder static mesh or the cylinder within the spawner actor). How can I get the GlobeAnchorComponent to be added to the ForEachLoop and pass the coordinates of each cylinder? As I am trying to create a digital twin, the cylinders need to get the information from the data table, I cannot add the coordinates manually (we are talking about positioning 1500+ cylinders as placeholders for buildings in a city)

Further trials resulted in the following

However, it still does not populate. I can see that it reads the coordinates from the data table, it converts them to something different but still it does not appear…

As before, any advise is appreciated.

I’ve only looked briefly, but I see two problems with your Blueprint.

First, you’ve connected Longitude to Latitude and vice-versa on the “Transform Longitude Latitude Height Position to Unreal” node. Longitude is the first connection point, as the name indicates.

Second, you’ve set the Unreal Z coordinate to -200 instead of computed Z value. If you’re confident in the -200, then this might be ok near the georeference origin. But on a round planet, Z is not “up” anymore as you move away from the origin.

There is a post pending with a newly created image, however please see my newly created Blueprint that scatters the cylinders in the correct area, however not in the corrector positions (some of the cylinders end up in a river where these should distinguish buildings). Upon approval the screenshot will show progress

Hi Kevin, thank you for this observation! Trully indeed, the lat, long needed to be vice versa, plus I moved the -200 of Z to 0.
I am starting getting some results. See screenshot below:

What it looks odd is, that although the cylinders are now scattered, still they do not fall into the correct place. These cylinders demonstrate the position of degraded buildings, but some end up in the river. I double-checked the coordinates and they are correct in Google Maps.
Any further advise is always welcome!

You’ve flipped the X and Y coordinates passed to the SpawnActor node. Those are Cartesian Unreal world coordinates, not longitude/latitude.

Thank you Kevin for this information! Can you please elaborate a bit more? Shouldn’t I flip those? How to go from Cartasian to WGS via Cesium? I am a bit puzzled here…

And success! Thank you Kevin, I flipped back the X and Y coordinates and it finally works! Thank you for your support!

BP_Cylinder Spawner, Blueprint to spawn cylinders in specific coordinates via data table and Cesium posted by R4k00n | blueprintUE | PasteBin For Unreal Engine