Recently I tried to visualize building blocks with terrain data on Cesium. The glTF models were nicely put onto the globe, but with the terrain data from both Cesium Terrain providers, the buildings "sinked" beyond the surface. I double-checked the building data and it was correct. Then I switched to the VT MÄK VR-TheWorld Server and everything worked perfectly. I trying to scale the height dimension of the building models and found if multiplied by nearly 1.5 they will fit the terrain from the Cesium providers well.
Following are two screenshots. The first is with VT MÄK VR-TheWorld Server, the second is with the Cesium providers, which is blank since I turned on depth check. Without the depth check I can see strange "drift" which indicates that the models are beyond the surface.
Are there something wrong with the terrain providers, or did I miss something?
Hi Anran,
By chance are the elevation values you are using to position the buildings relative to sea level? Mean sea level in the area of your screenshots is around 47m, what are the results if you boosted all of your buildings by that much?
Many thanks for your reply! I have to check it tomorrow, but after some simple calculation based on memory, I think this is probably the case. So the elevation values Cesium provides are relative to the WGS 84 ellipse?
I tried to set a 47m offset and it surely seems correct, and also I found this issue which explained why VR-TheWorld Server is different with the Cesium server.
Could you tell me the formula you used to figure out the 47m delta between sea level and the cesium representation of 0 elevation at the latitude of the specific area.
I need to be able to put buildings on the map at the visually correct elevation any where in the world so I need to factor the latitude into the calculation.
The terrain elevations in Cesium are relative to the WGS84 ellipsoid. You can use the EGM96 geoid for a global MSL approximation to sample geoid heights relative to the WGS84 ellispoid, see here:
Thank you for the response Alexander. It looks as though the elevation conversion requires a lookup table in a 3.3MB file rather than a stand-alone formula. I was hoping to implement the conversion entirely on the browser side which would mean always downloading the Geoid height file. Do you know if this is my only option?
Thank you for the response Alexander. It looks as though the elevation conversion requires a lookup table in a 3.3MB file rather than a stand-alone formula. I was hoping to implement the conversion entirely on the browser side which would mean always downloading the Geoid height file. Do you know if this is my only option?
Thanks,
Alec.
> Hi Alec,
>
>
> The terrain elevations in Cesium are relative to the WGS84 ellipsoid. You can use the EGM96 geoid for a global MSL approximation to sample geoid heights relative to the WGS84 ellispoid, see here:
>
>
> NGA Geomatics - WGS 84
>
>
> Alex
>
>
> Hi Alexander,
>
>
>
>
>
> Could you tell me the formula you used to figure out the 47m delta between sea level and the cesium representation of 0 elevation at the latitude of the specific area.
>
>
>
> I need to be able to put buildings on the map at the visually correct elevation any where in the world so I need to factor the latitude into the calculation.
>
>
>
> Thank you,
>
> Alec.
>
>
>
>
>
> --
>
> You received this message because you are subscribed to the Google Groups "cesium-dev" group.
>
> To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.
Thank you for the response Alexander. It looks as though the elevation conversion requires a lookup table in a 3.3MB file rather than a stand-alone formula. I was hoping to implement the conversion entirely on the browser side which would mean always downloading the Geoid height file. Do you know if this is my only option?
Thanks,
Alec.
> Hi Alec,
>
>
> The terrain elevations in Cesium are relative to the WGS84 ellipsoid. You can use the EGM96 geoid for a global MSL approximation to sample geoid heights relative to the WGS84 ellispoid, see here:
>
>
> NGA Geomatics - WGS 84
>
>
> Alex
>
>
> Hi Alexander,
>
>
>
>
>
> Could you tell me the formula you used to figure out the 47m delta between sea level and the cesium representation of 0 elevation at the latitude of the specific area.
>
>
>
> I need to be able to put buildings on the map at the visually correct elevation any where in the world so I need to factor the latitude into the calculation.
>
>
>
> Thank you,
>
> Alec.
>
>
>
>
>
> --
>
> You received this message because you are subscribed to the Google Groups "cesium-dev" group.
>
> To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.
Hi Alec,
I think the difference of elevation between geoid and sea level comes from the nature of earth itself (Geoid - Wikipedia ), so it may not be possible to "calculate" it by formulas or so. If you worry about the 3.3MB extra downloads, preprocessing your data may be the best way to go. Another possible approach may be to set up a geoid server and just query for the area in the view dynamically.