Trouble with GeographicTilingScheme and flat projection

I have an ImagerySource (Google Earth Enterprise) which uses a “flat” projection. To get it working, I had to use a GeographicTilingScheme with an Extent(-Math.PI, -Math.PI, Math.PI, Math.PI). If I used the default extent, only portions of the earth would be covered. You can see this in the default_extent.png file.

The problem is that at high latitudes the imagery gets very blurry and distorted. I noticed that if I start at the equator (zoomed in so that it is requesting tiles with a zoom level of 7) and I start rotating the globe towards one of the poles, the zoom level of the tiles requested slowly goes down to a zoom level of 4 over each of the poles. This results in very blurry imagery.

I’m not quite sure how to solve this problem.

Here is the code I am using for the buildImageUrl function:

function buildImageUrl(imageryProvider, x, y, level) {

var imageUrl = imageryProvider._imageUrlTemplate;

imageUrl = imageUrl.replace(’{x}’, x);

imageUrl = imageUrl.replace(’{y}’, y);

// Google Earth starts with a zoom level of 1, not 0

imageUrl = imageUrl.replace(’{zoom}’, (level + 1));

var proxy = imageryProvider._proxy;

if (typeof proxy !== ‘undefined’) {

imageUrl = proxy.getURL(imageUrl);

}

return imageUrl;

}

I forgot to say that when you are over the poles, if you continue to zoom in it will download higher resolution imagery, but it only does so in a delayed fashion.

Hi Caleb,

I don’t have access to a Google Earth Enterprise server, nor do I know how their tiling works. Can you send me a few example tiles? Just the first two levels would probably be sufficient. It would probably be best to send them to me privately.

Thanks,

Kevin

I just sent you a message with the first two layers of imagery.

I forgot to say before that with the custom Extent that I mentioned before, the globe does look ok. It’s only when you start zooming in on the poles that the problem happens.

new_extent.png

Thanks, Caleb.

I think your approach of setting a larger extent is reasonable given the (slightly odd) projection used by Google Earth.

Do you see the same blurriness at the poles when using the default Bing imagery? I suspect you probably do. Cesium tries to account for the fact that tiles with equal widths and heights, expressed in units of degrees, get smaller near the poles. It is probably imperfect. See the computation of latitudeFactor in CentralBodySurface.js in the screenSpaceError function. If you set the latitudeFactor to 1.0, this adjustment for latitude will be disabled. There’s another similar computation for imagery in ImageryLayer.js, getLevelWithMaximumTexelSpacing.

Let me know if that helps.

Kevin

I do see the same blurriness with the default Bing imagery. However, it is much more pronounced with the Google Earth imagery. With the Google Earth there is very noticeable blurriness at the bottom of South America.

Setting latitudeFactor to 1.0 in CentralBodySurface doesn’t seem to make any difference. But, changing it in ImageryLayer does make a pretty big difference. Is it possible to make ImageryLayer take into account the extent being used when calculating the latitudeFactor?

Ok, it might be worse with the GE imagery just because of the difference in projection. Bing uses web Mercator, which is highly overdefined near the poles. GE’s geographic projection is less so.

I need to think through whether that latitudeFactor really makes sense. It’s possible the two factors (one in CentralBodySurface and one in ImageryLayer) are double-counting the effect.

I’m not sure what you mean by “take into account the extent”. It does take into account the latitude within the extent that is closest to the equator, which is the location where an imagery texel maps to the largest area on the globe. Are you suggesting there’s something more it should be doing?

Kevin

Ah, that’s true. When I was testing with a version of the GE globe that used the Mercator projection the distortion was significantly less.

Oops, that was my bad. I forgot that a different projection was being used. I had been thinking that the changes I made to the Extent were affecting how the imagery was being mapped onto the globe.