What does n mean in this formula: n = pow(2, zoom)? I using this when I calculate tiles. Thank you
|
closed as not a real question by whuber♦ Dec 10 '12 at 21:16
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, see the FAQ.
|
n shows, how many tiles are in one edge of tileset for given zoom level. Tiles can be addressed by x/y/z "coordinates". n-1 is maximum value of x and y in that zoomlevel. Probably it's simpler to explain by example: Total count of tiles in given zoom level is pow(2, zoom*2) In zoom level 0, there are 1*1 tiles (n=1) In zoom level 1, there are 2*2 tiles (n=2) In zoom level 2, there are 4*4 tiles (n=4) etc |
|||||
|
|
As already said in other answers, it seems that the equation gives an estimation of the number of tiles for each zoom level. But there is, in my opinion, an important issue. The equation is valid in scenarios where the set of map resolutions match the sequence R, R/2, R/4, R/8..., where R is the map resolution corresponding to the zoom level 0. While this scenario is the most common, it is not the only possible. A sequence of map resolutions like R, R/3, R/9, R/27... would be possible, or even any set of numbers sorted in descending order. In any of these two scenarios the mentioned equation is not valid. |
|||||
|
|
I think it's the number of tiles. its value is calculated by powers of two. For example, when zoom level is 0, n = 1, when zoom level is 1, n = 2, when zoom level is 2, you get 4 titles, and so on. That means when map is zoomed in larger, map is divided by more tiles. |
|||
|
|
|
In php and many other languages the pow(a,b) or power(a,b) function raises a to the b power, or multiples a by itself b times. pow(2,3) equals 8. In your case the higher the zoom level the larger N is. |
|||
|
|
|
'n' is almost always used to denote the number of items in a dataset (ie the number of people who participated in a survey or the number of animals counted). I would venture to guess that in this case it represents the number of tiles present at a given zoom level. However, without more information about precisely what you are trying to accomplish it is difficult to be more specific or accurate. |
|||
|
|
