Question

In my Android project im using mapquest data with OSMdroid. I would like to know what map scales the zoomlevels provide (e.g. 1:10000 etc.). I just found zoomlevel to scale depending on DPI (Is the map's scale also depending on the width and height of the map view, that I am showing?). If I use the mapquest map site, I just see a mapscale in the bottom left corner, but not in a ratio like 1:10000, which I actually need.

What are the scales 1:x at zoomlevel 16,15,14 ?

Was it helpful?

Solution

There are a few things going on here. Let me step through it as I understand it.

First, I believe what you are seeing in the Mapquest link is the ratio. So for zoomlevel 16,15,14:

14 = 1:27083
15 = 1:13541
16 = 1:6770

Although the link doesn't specify it, that should be in meters. So in zoom level 14, every pixel represents 27083 meters.

Additionally, the Bing maps ratios are found here. They are pretty close to the numbers that Mapquest reports, but they are not the same.

So, why are the numbers different? Because the meters-per-pixel ratio changes depending on what latitude you are at. Because of the distortion the Mercator projection produces, the meters-per-pixel is not constant as you change latitude. The Bing maps values are the values at the equator. I don't know where the Mapquest values come from.

Finally - to calculate meters-per-pixel in osmdroid you can call:

TileSystem.GroundResolution(latitude, zoomLevel);

And that will give you meters-per-pixel for a specific latitude. I recommend you take a look at osmdroid's ScaleBarOverlay for an example of how to apply this information.

OTHER TIPS

Stay at the 0° latitude or the equatorial line (earth radius of 6372.7982km for the earth model of the map and equatorial circunference approximate as 40041.472km):

  • zoom level 0 represents 360° in a window (of 256px) which is on the equatorial line 40'041km
  • zoom 1 only 180° in the same window which is 20020km
  • zoom 2 is 90°, or 10010km
  • and so on always halving.

The scale (always speaking at the equatorial line) depends on the size of your window, if it is 1km wide, it is:

  • zoom 0 is 1:40041
  • zoom 1 is 1:20020
  • zoom x is 1:40041/2^x
  • etc

If the window is 1 inch wide:

  • zoom 0 is 1in:40041km or 1:1'576'417'322
  • zoom 10 is 1in:40041/1024km or 1:1'539'470
  • zoom 16 is 1:24054

If the window is 200px wide (for a 180 DPI screen):

  • zoom 0 is 200px:40041km or 1:1'418'775'590
  • zoom 18 is 200px:40041km/2^18 or 1:5412

This is just on the equatoriali line (0° latitude). In the north or south there is a correction factor to be applied, which is cos(latitude degrees).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top