GoogleEarthEnterpriseImageryProvider renders distorted or blank tiles for higher res imagery
- Dominant language
- JavaScript
- Stars
- 15.7k
- Forks
- 3.9k
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 34
Description
### What happened?
Using GoogleEarthEnterprise[Imagery|Terrain]Providers, we started having issues with Cesium rendering a distorted (quilt-like) image, or empty black space when we zoom into areas with higher resolution data.
The only error logged is the following. This error was recorded with the latest Cesium (v1.123.0)
Error Logged to Chrome Console: [GeeError.log](https://github.com/user-attachments/files/17636534/GeeError.log)
Tested all versions between 1.84 and 1.97 and first version this happens on is 1.92. As well as more recent versions
The most recent and relevant commit to this issue is: [Remove when.js and replace with native promises](https://github.com/CesiumGS/cesium/commit/31c154a299927af69c9a66415b2e451d96d10dbb#diff-a8c6140e2ecad8e56c8c3814821d86157e23a4f2ccf431e46218e3eb05828ebcL515)
When I comment out the GoogleEarthEnterpriseTerrainProvider, the imagery for those higher resolution areas are loaded properly. But obviously, I don’t have terrain data.
```
// 1.84 - 1.97
// options.terrainProvider = new Cesium.GoogleEarthEnterpriseTerrainProvider({
// metadata: geeImgMetadata
// });
// 1.113+
/* viewer.scene.terrainProvider = await Cesium.GoogleEarthEnterpriseTerrainProvider.fromMetadata(
geeMetadata
);
*/
```
I am using a GoogleEarthEnterprise server and can easily reproduce this issue on a [Earth Enterprise Portable Server](https://github.com/google/earthenterprise/wiki/Portable-Server) using the demo globe data provided by the EarthEnterprise server (tutorial_sf.glb). I can’t attach the tutorial_sf.glb file because it is > 30MB.
Screenshots:
High altitude zoom level where imagery appears prior to zooming in:

Quilt-like rendering when I zoom in one or more level(s) (using scroll wheel):

Empty Space rendered when slightly more zoomed in:

When terrain is disabled, imagery loads fine:

Link to forum post: https://community.cesium.com/t/google-earth-enterprise-terrainprovider-not-rendering-tiles-in-1-92/33010
I'm happy to help with the fix, or testing.
### Reproduction steps
Reproduction steps are somewhat complicated snce this requires a GoogleEarth Enterprise Server. However, I am using a Portable Server (which is a Windows executable) and a portable globe that I can easily provide. The steps below assume you have a portable server installed.
1. Configure GEE Portable Server to host the default (tutorial_sf.glb) globe.
- Sample GEE portable.cfg

2. Configure Cesium to connect to the GEE Portable Server
- This sandcastle example snippet should work if copied to a local cesium application.
- https://sandcastle.cesium.com/?src=Google%20Earth%20Enterprise.html&label=All
- Replace the url with
- url: "http://localhost:9335,
- No proxy needed if hosted locally
- Sample snippet
```
const viewer = new Cesium.Viewer("cesiumContainer", {
baseLayerPicker: false,
});
try {
const geeMetadata = await Cesium.GoogleEarthEnterpriseMetadata.fromUrl(
new Cesium.Resource({
url: "http://localhost:9335",
proxy: new Cesium.DefaultProxy("/proxy/"),
}),
);
viewer.scene.terrainProvider =
Cesium.GoogleEarthEnterpriseTerrainProvider.fromMetadata(geeMetadata);
const layers = viewer.scene.imageryLayers;
const blackMarble = new Cesium.ImageryLayer(
Cesium.GoogleEarthEnterpriseImageryProvider.fromMetadata(geeMetadata)
);
layers.add(blackMarble);
} catch (error) {
console.log(`Failed to create Google Earth providers from metadata. Confirm GEE service is correctly configured.
${error}`);
}
// Start off looking at San Francisco.
viewer.camera.setView({
destination: Cesium.Rectangle.fromDegrees(-123.0, 36.0, -121.7, 39.0),
});
```
### Sandcastle example
_No response_
### Environment
Browser: Google Chrome Version 130.0.6723.92 (Official Build) (64-bit)
CesiumJS Version: 1.92+
Operating System: Rendering in Windows on Chrome. Cesium web app hosted in linux via NodeJS.
Contributor guide
Research direction
Start with GoogleEarthEnterpriseTerrainProvider and GoogleEarthEnterpriseImageryProvider, then compare their behavior around the referenced native-promises commit. Reproduce the issue with the GEE Portable Server tutorial_sf.glb and the linked Sandcastle configuration; done means high-resolution imagery renders correctly at successive zoom levels while terrain remains enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100