Wrong alignment between Cesium World Terrain, Google Photorealistic 3D Tile and CityGML data

Hi there, I am facing a strange issue when loading my CityGML data to cesium ion. When I open the code example in sandcastle, if I select as terrain the Cesium World Terrain my buildings and streets are strangely misaligned, but If I visualize Google Photorealistic 3D Tiles I see that they are perfectly aligned with my data. Can anyone help me?

Hi there,

Where are you loading your CityGML data from?

Typically, building data is clamped before runtime to a specific terrain. In that case, the terrain appears to be Cesium World Terrain.

Google Photorealistic 3D Tiles differs in height from CWT because of slightly different reference frames. I don’t believe it’s optional to use Google’s data for clamping due to restrictions on their licensing. It may be worth popping into Cesium ion to ask the ion developers what’s possible here.

Hi, thank you for your kind reply. I am loading a CityGML file created through 3DCityDB starting from a CityJSON created programmatically. I tried to clamp the data during the loading procedure, but while it worked pretty well for buildings, it failed concerning the road geometry.

As you suggested, I will try to ask in the Cesium ion community, thank you again!


Yes, roadways and bridges can be difficult problems to resolve when clamping to terrain. We’ve run into this with other building datasets, and are reconsidering the approach for roadways and bridges overall.

No news on that yet, but I did want to acknowledge that it’s a hard problem which we’re thinking about.