Answers to: How to calculate the size of a map tile on the ground?https://help.openstreetmap.org/questions/1069/how-to-calculate-the-size-of-a-map-tile-on-the-ground<p>I'm creating a web interface where users click on a map to denote a point of interest. My application then returns all items in a database that lie within a specified distance of that point. I'm only concerned with UK (I mention this in case there's a good approximation available) and primarily working with zoom=9.</p>
<p>AIUI, each tile covers a certain angle of latitude and longitude rather than distances over the ground. Thanks to the information in <a>this wiki article</a>, I can calculate the distance between the top-left corners of adjacent tiles (and hence derive the distance over the ground for any tile), but that seems rather messy.</p>enFri, 14 Feb 2014 12:10:13 +0000Answer by erikhttps://help.openstreetmap.org/questions/1069/how-to-calculate-the-size-of-a-map-tile-on-the-ground/30744<p>You can calculate it yourself, based on <a href="http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames#Resolution_and_Scale">this wiki page</a>:</p>
<pre><code>resolution = 156543.034 meters/pixel * cos(latitude) / (2 ^ zoomlevel)
</code></pre>
<p>The resolution means how many meters per pixel you get. If you want to know how many pixels per meter, just use the inverse. That is:</p>
<pre><code>pixels = 1/resolution * distance
</code></pre>
<hr>
<p>And if you want to calculate the scale (to write it on the map for printing it):</p>
<pre><code>scale = 1 : (dpi * 39.37 in/m * resolution)
</code></pre>
<p>The scale means, how many cm in reality is 1 cm on the paper (or on the screen).</p>
<p>So if you have a screen with 96 dpi, you get that one pixel is 1.1943 meters. And you get a scale of 1 : 4 231 which means that 1 cm on your screen is 42.3 m in reality.</p>
<p>If you have a printer which prints 300 dpi … (now do the calculations yourself).</p>erikFri, 14 Feb 2014 12:10:13 +0000https://help.openstreetmap.org/questions/1069/how-to-calculate-the-size-of-a-map-tile-on-the-ground/30744Answer by Frederik Rammhttps://help.openstreetmap.org/questions/1069/how-to-calculate-the-size-of-a-map-tile-on-the-ground/1078<p>If you are happy with an approximation then think about this:</p>
<ul>
<li>At zoom level 9, your world has 2^9 by 2^9 tiles (that's 512x512 tiles). </li>
<li>The Earth's circumference is roughly 40,000 kilometres.</li>
</ul>
<p>Thus:</p>
<ul>
<li>For the y axis, you have 20,000 km from North Pole to South Pole, divided by 512, that's roughly 39 km for the height per tile. (The 512x512 tiles don't exactly stretch all the way to the poles, only to the 85° line, but we can ignore that for this approximation.) This tile height is the same everywhere.</li>
<li>For the x axis it is not quite so easy because the number of kilometres used by the 512 tiles is different depending on where you are - 40,000 km at the Equator, 25,000 at the latitude of the Scilly Isles, and 20,000 at the latitude of Unst. So it's fair to use 22,500 as an approximation for the UK; divide that by 512 and you end up at a tile width of roughly 44km.</li>
</ul>
<p>Or very roughly: A zoom level 9 tile in the UK has 40x40km. (Double the width/height when you decrement the zoom level, halve the width/height when you increment.)</p>Frederik RammFri, 08 Oct 2010 19:56:18 +0100https://help.openstreetmap.org/questions/1069/how-to-calculate-the-size-of-a-map-tile-on-the-ground/1078