Tileset height values have abruptly changed today in my CesiumForUnity application, and I’m quite confused about what has happened.
Perhaps the most direct symptom is that the Cesium World Terrain and Google Photorealistic 3D Tiles tilesets do not agree on ground level, differing by 10m or so, and I believe they agreed yesterday.
I also have ecef positions for my application objects recorded in a database, and today all of those values are suddenly wrong with respect to the Google Photorealistic Tileset (which is the reference I was using to place them), with a height difference of a couple meters. No code changes were made.
I also have a cesiumjs server that I use to directly query height above the ellipsoid of ground level at a gps coordinate, because I couldn’t figure out a way to do that in unity. The values returned by that server have suddenly changed; I know offhand the value that was previously being returned for certain coordinates, and they are now different by about 10m. The server is very simple, this is the relevant code:
const terrainProvider = await Cesium.createWorldTerrainAsync({
requestVertexNormals: true,
});
const positions = coordinates.map(({ latitude, longitude }) =>
Cesium.Cartographic.fromDegrees(longitude, latitude)
);
const sampledPositions = await Cesium.sampleTerrainMostDetailed(
terrainProvider,
positions
);
const heights = sampledPositions.map((pos) => pos.height);
Am I going crazy? I don’t know how to explain the sudden changes I am seeing today.
I’m now assuming that this has to do with the Google 3D Photorealistic Tiles outage that happened day before yesterday. Did Google perhaps make a change to their underlying datum during that outage, or something like that?
Doing some more research, it also sounds like I might have been mistaken that the world terrain and google tiles previously had ground levels that matched, or that that might have just been accidentally true in the location I am focusing on. Bit frustrating, I guess my project was relying on some faulty assumptions.
So I guess I have a more basic question: Should I be able to rely on objects that use cesium globe anchors (with ecef coordinates that I persist across app sessions), and are positioned relative to google 3d tiles, to retain that relative positioning over time, or does google not provide that guarantee?
I can’t seem to find the answer one way or the other.
Did Google perhaps make a change to their underlying datum during that outage, or something like that?
It’s entirely possible. Google doesn’t publish a list of changes, to my knowledge.
Should I be able to rely on objects that use cesium globe anchors (with ecef coordinates that I persist across app sessions), and are positioned relative to google 3d tiles, to retain that relative positioning over time, or does google not provide that guarantee?
I have never heard of such a guarantee from Google.
In fact, it’s pretty unlikely, right? Because guaranteeing that would eliminate their ability to fix incorrect heights, provide better data for an area, etc.
Rather than hard-coding ECEF positions, you might consider using the new SampleHeightMostDetailed
function on Cesium3DTileset
. It’s similar to the CesiumJS functionality in your example code.