[OSM-talk] scale question
Ben Last
ben.last at nearmap.com
Fri Jul 9 01:27:29 BST 2010
>
> At 09.07.2010 01:19, Mostafa El-ashram wrote:
>
> Please could you tell me how to determine the scale of a map on open
>> street maps
>>
>
The TMS co-ordinate system (OSM, Google Maps, NearMap, Bing Maps, etc) use
a Mercator projection; you'll find it referred to as "cylindrical Mercator"
and "spherical Mercator".
http://en.wikipedia.org/wiki/Mercator_projection
http://mathworld.wolfram.com/MercatorProjection.html
http://www.sharpgis.net/post/2007/07/27/The-Microsoft-Live-Maps-and-Google-Maps-projection.aspx
To derive the scale in metres per pixel at a given latitude and zoom level,
you can use this (JavaScript, which uses radians for trig):
metresPerPixel = Math.abs(156543.04 * Math.cos(latitudeAtCentreOfMap *
nml.PI / 180)) / Math.pow(2, zoomLevel);
See http://msdn.microsoft.com/en-us/library/aa940990.aspx for a reference.
Cheers
b
--
Ben Last
Development Manager (HyperWeb)
NearMap Pty Ltd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk/attachments/20100709/9346b3ae/attachment.html>
More information about the talk
mailing list