# Layers Levels Tiles etc

How does altitude relate to a level in a layer being displayed?

The height at which the WW switches from viewing N-1st to Nth level, is: ( Level0TileSize * 390km / 2^N ) * somefactor.

E.g., for NLT LS7 layer, which has L0TS=2.25deg: its 0th level becomes visible after sinking under 390*2.25 = 877km, level 1 under 439km, etc.

The given formula was deduced from observing of WW's behavior, not by reading source code (sorry).

For small heights (say, under 2000km), the somefactor nears 1. Then, higher, it weakens (maybe like the arctan(x)/x function, or...?)

One may ask, why just 390km, why a nonlinear/nonconstant somefactor? Perhaps some of the main WW coders know :)

A Small Analyse:

(assuming the default settings: window dimensions wWidth=992px and wHeight=653px, vertical field of view FOV=45deg)

Let's imagine that we've turned on the Community Landsat7 layer (has L0TS=2.0deg) and sunk under altitude Alt=195km, thus level2 tiles started to appear. What's the vertical (N-S) dimension of the pictured area? It is nsDim = Alt * 2*tan(FOV/2) , in our case nsDim = 195km * 2*tan(22.5deg) = 161.5km.

Converting it into degrees (1deg=111km), we get nsDim = 1.454deg. Each level2 tile covers 0.5 by 0.5 degree area, so our 'aperture' corresponds to 1.454/0.5 = 2.91 tiles (from bottom to top), or 2.91*512 = 1489 pixels (of tiles).

The 1489/653=2.28 factor could be named a Linear Oversampling- (or Vaste- ?) Factor. After squaring it, we get Areal Oversampling Factor, in our example it's 5.20.

What does this mean? 5.2 pixels of texture are needed to form one resultant pixel.

How far can we dip without entering the next level? In our case, the next threshold is at Alt=97.5km, or half of that 195km. When reaching it, the level2 tiles are shrunk only by L.O.F.=1.14, or A.O.F.=1.30 factor.

Now let's generalize it:

<Here come several formulae generalizing the above computations.>

When are these LOF and AOF becoming big (giving evidence about vasting)? When the user has

- reduced the WW window's height,

- increased the FOV (aka zoomed out),

- tilted significantly,

- gone near the Pole,

- ...what else have I forgot?

In such situation the Areal oversampling factor may reach mighty levels, e.g. several dozens, which means that 100-or-so megabyte of tiles are needed for rendering of about-1 Mpix picture.

... to be reedited and continued (e.g. the When do you know when to 'stop'? (ie. how do you know you are at 1:1) question) ...

(by Sqr)

##### Personal tools
World Wind Central
Knowledge Base
Toolbox