Zoom levels

Distances per degree of longitude,
for the latitudes marked in the picture.
Difference of
longitudes
Actual distances
at 0° lat. at 30° lat. at 60° lat. at 87.5° lat.
0.010 00 °~ 1 000 m~ 870.00 m~ 500.0 m~ 43.62 m
0.001 00 °~ 0 100 m~ 087.00 m~ 050.0 m~ 04.36 m
0.000 10 °~ 0 010 m~ 008.70 m~ 005.0 m~ 00.44 m
0.000 01 °~ 0 001 m~ 000.87 m~ 000.5 m~ 00.04 m
Level # Tiles Tile width
(° of longitudes)
m / pixel
(on Equator)
~ Scale
(on screen)
Examples of
areas to represent
00000 000 000 001360.0000156 543.0001:500 millionwhole world
01000 000 000 004180.0000078 272.0001:250 million
02000 000 000 016090.0000039 136.0001:150 millionsubcontinental area
03000 000 000 064045.0000019 568.0001:70 millionlargest country
04000 000 000 256022.5000009 784.0001:35 million
05000 000 001 024011.2500004 892.0001:15 millionlarge African country
06000 000 004 096005.6250002 446.0001:10 millionlarge European country
07000 000 016 384002.8130001 223.0001:4 millionsmall country, US state
08000 000 065 536001.4060000 611.4961:2 million
09000 000 262 144000.7030000 305.7481:1 millionwide area, large metropolitan area
10000 001 048 576000.3520000 152.8741:500 thousandmetropolitan area
11000 004 194 304000.1760000 076.4371:250 thousandcity
12000 016 777 216000.0880000 038.2191:150 thousandtown, or city district
13000 067 108 864000.0440000 019.1091:70 thousandvillage, or suburb
14000 268 435 456000.0220000 009.5551:35 thousand
15001 073 741 824000.0110000 004.7771:15 thousandsmall road
16004 294 967 296000.0050000 002.3891:8 thousandstreet
17017 179 869 184000.0030000 001.1941:4 thousandblock, park, addresses
18068 719 476 736000.0010000 000.5971:2 thousandsome buildings, trees
19274 877 906 944000.0005000 000.2991:1 thousandlocal highway and crossing details
201 099 511 627 776000.00025000 000.1491:5 hundredA mid-sized building
  • The "# Tiles" column indicates the number of tiles needed to show the entire world at the given zoom level. This is useful when calculating storage requirements for pre-generated tiles.
  • The "° Tile width" column gives the map width in degrees of longitude, for a square tile drawn at that zoom level.
  • Values listed in the column "m / pixels" gives the number of meters per pixel at that zoom level for 256-pixel wide tiles. These values for "m / pixel" are calculated with an Earth radius of 6372.7982 km and hold at the Equator; for other latitudes the values must be multiplied by the cosine (approximately assuming a perfect spheric shape of the geoid) of the latitude.
  • "~ Scale" is only an approximate size comparison and refers to distances on the Equator. In addition, the given scales assume that 256-pixel wide tiles are rendered and will be dependent on the resolution of the viewing monitor: these values are for a monitor with a 0.3 mm / pixel (85.2 pixels per inch or PPI). Such scale is typically used for the kind of area to represent on a single tile (Note that when rendering on the web, the standard CSS pixel size is defined at 96 PPI, browsers will rescale the images when needed but only by integer factors on PNG images to avoid making the rentered text or icons too fuzzy; if the screen has a lower resolution, the rendered images may be larger; and it's possible for a renderer to create image with other resolutions than 256 pixels at 96 PPI to better fit the expected sizes, and for a web interface to automatically select other available resolutions for Hi-DPI screens, but this requires more storage and computing resources on the server; as well the zoom level in the formulas above do not necessarily need to be integers, and this may be used to get intermediate scales with tiles having more pixels).

Distance per pixel math

The horizontal distance represented by each square tile, measured along the parallel at a given latitude, is given by:

Stile = C ∙ cos(latitude) / 2 zoomlevel

where C means the equatorial circumference of the Earth (40 075 016.686 m ≈ 2π ∙ 6 378 137.000 m for the reference geoid used by OpenStreetMap).

As tiles are 256-pixels wide, the horizontal distance represented by one pixel is:

Spixel = Stile / 256 = C ∙ cos(latitude) / 2 (zoomlevel + 8)
For example on the equator and at zoom level 0, we get 40 075 016.686 / 256 ≈ 156 543.03 (in meters per pixel).

Make sure your calculator is in degrees mode, unless you want to express latitude in radians for some reason. C should be expressed in whatever scale unit you're interested in (miles, meters, feet, smoots, whatever).

This formula assumes that the Earth is perfectly spheric, but since the Earth is actually ellipsoidal there will be a slight error in this calculation, which does not take into account the flattening (with a slight reduction of radius for the best-fitting sphere passing at geographic poles at average sea level). But this error is very slight: it is null on the reference Equator, then grows to an absolute maximum of 0.3% at median latitudes, then shrinks back to zero at high latitudes towards poles.

The error also does not take into account additional differences caused by variation of the altitude on ground, or by the irregular variations of the geographic polar axis, and other errors caused by celestial tidal effects and climatic effects on the average sea level, or by continent drifts, major earthquakes, and magmatic flows below the crust).

Mapbox GL

Mapbox GL–based libraries uses 512×512-pixel tiles by default, so Mapbox GL zoom levels are one fewer than the zoom levels described above that are used by other tools.

See also

This article is issued from Openstreetmap. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.