According to this gis stackexchange answer and this stackoverflow question the scale ratio for google maps at any given zoom level is 591657550.500000 / 2^(level-1)
. That's not the circumference of the earth in meters, miles or kilometers. What is that number? Just curious how the calculations came about.
Answer
The number comes from the tile resolution being set at a multiple of 256 pixels, and from the screen resolution (96dpi). Per Bing's page about their map tile system:
The map scale indicates the ratio between map distance and ground distance, when measured in the same units. For instance, at a map scale of 1 : 100,000, each inch on the map represents a ground distance of 100,000 inches. Like the ground resolution, the map scale varies with the level of detail and the latitude of measurement. It can be calculated from the ground resolution as follows, given the screen resolution in dots per inch, typically 96 dpi:
map scale = 1 : ground resolution * screen dpi / 0.0254 meters/inch = 1 : (cos(latitude * pi/180) * 2 * pi * 6378137 * screen dpi) / (256 * 2 level * 0.0254)
At the most zoomed in, that works out to ~591,658,711. That's slightly off from the 591,657,550.5 value for Google maps, but I think the error can be attributed to different decisions about how to do rounding.
No comments:
Post a Comment