# Web Mercator projection

(Redirected from Web Mercator)
The standard style for OpenStreetMap, like most Web maps, uses the Web Mercator projection.

Web Mercator, Google Web Mercator, Spherical Mercator, WGS 84 Web Mercator[1] or WGS 84/Pseudo-Mercator is a variant of the Mercator projection and is the de facto standard for Web mapping applications. It rose to prominence when Google Maps adopted it in 2005.[2] It is used by virtually all major online map providers, including Google Maps, Mapbox,[3] Bing Maps, OpenStreetMap, Mapquest, Esri, and many others.[4] Its official EPSG identifier is EPSG:3857, although others have been used historically.

## Properties

Web Mercator is a slight variant of the Mercator projection, one used primarily in Web-based mapping programs. It uses the same formulas as the standard Mercator as used for small-scale maps. However, the Web Mercator uses the spherical formulas at all scales whereas large-scale Mercator maps normally use the ellipsoidal form of the projection. The discrepancy is imperceptible at the global scale but causes maps of local areas to deviate slightly from true ellipsoidal Mercator maps at the same scale. This deviation becomes more pronounced further from the equator, and can reach as much as 40 km on the ground.[5][6]

While the Web Mercator's formulas are for the spherical form of the Mercator, geographical coordinates are required to be in the WGS 84 ellipsoidal datum. This discrepancy causes the projection to be slightly non-conformal. General lack of understanding that the Web Mercator differs from standard Mercator usage has caused considerable confusion and misuse.[4]:87 For all these reasons, the United States Department of Defense through the National Geospatial-Intelligence Agency has declared this map projection to be unacceptable for any official use.[7]

### Formulas

Formulas for the Web Mercator are fundamentally the same as for the standard spherical Mercator, but before applying zoom, the "world coordinates" are adjusted such that the upper left corner is (0, 0) and the lower right corner is (256, 256):[8]

{\displaystyle {\begin{aligned}x&={\frac {256}{2\pi }}2^{\text{zoom level}}(\lambda +\pi ){\text{ pixels}}\\[5pt]y&={\frac {256}{2\pi }}2^{\text{zoom level}}\left(\pi -\ln \left[\tan \left({\frac {\pi }{4}}+{\frac {\varphi }{2}}\right)\right]\right){\text{ pixels}}\end{aligned}}}

where λ is the longitude in radians and φ is geodetic latitude in radians.

Because the Mercator projects the poles at infinity, Google Maps cannot show the poles. Instead it cuts off coverage at 85.051129° north and south. This is not considered a limitation, given the purpose of the service. The value 85.051129° is the latitude at which the full map becomes a square, and is computed as φ given y = 0:

{\displaystyle {\begin{aligned}\varphi _{\text{max}}=\left[2\arctan(e^{\pi })-{\frac {\pi }{2}}\right]\end{aligned}}}

### Spherical and ellipsoidal mix

The projection is neither strictly ellipsoidal nor strictly spherical. EPSG's definition says the projection "uses spherical development of ellipsoidal coordinates".[9] The underlying geographic coordinates are defined using the WGS84 ellipsoidal model of the Earth's surface, but are projected as if defined on a sphere.[6]

Web Mercator shares some of the same properties of the standard Mercator projection: north is up everywhere, meridians are equally spaced vertical lines, but areas near the poles are greatly exaggerated.

Unlike the ellipsoidal Mercator and spherical Mercator, the Web Mercator is not quite conformal due to its use of ellipsoidal datum geographical coordinates against a spherical projection. Rhumb lines are not straight lines. The benefit is that the spherical form is much simpler to calculate, saving many computing cycles.[10]

## Identifiers

Due to slow adoption by the EPSG registry, the Web Mercator is represented by several different names and spatial reference system identifierss (SRIDs), including EPSG:900913, EPSG:3785 and EPSG:3857.

### EPSG:900913

The projected coordinate reference system originally lacked an official spatial reference identifier (SRID), and the Geodesy subcommittee of the OGP's Geomatics committee (also known as EPSG) refused to provide it with one, declaring "We have reviewed the coordinate reference system used by Microsoft, Google, etc. and believe that it is technically flawed. We will not devalue the EPSG dataset by including such inappropriate geodesy and cartography."[11] The unofficial code "EPSG:900913" (GOOGLE transliterated to numbers) came to be used. It was originally defined by Christopher Schmidt in his Technical Ramblings blog[12] and became codified in OpenLayers 2,[13] which, technically, would make OpenLayers the SRID authority.

### EPSG:3785

In 2008, EPSG provided the official identifier EPSG:3785 with the official name "Popular Visualisation CRS / Mercator", but noted "It is not an official geodetic system".[6] This definition used a spherical (rather than ellipsoidal) model of the Earth.

### EPSG:3857

Later that year, EPSG provided an updated identifier, EPSG:3857 with the official name "WGS 84 / Pseudo-Mercator".[6] The definition switched to using the WGS84 ellipsoid (EPSG:4326), rather than the sphere.

Although the projection is closely associated with Google, Microsoft is listed as the "information source" in EPSG's standards.[14]

### Other identifiers

Other identifiers that have been used include ESRI:102113, ESRI:102100, and OSGEO:41001.[14][12]

ESRI:102113 corresponds to EPSG:3785 while ESRI:102100 corresponds to EPSG:3857.[15]

## WKT definition

The projection covers the Earth from −180° to 180° longitude, and 85.05° north and south. Using well-known text representation of coordinate reference systems (WKT), EPSG:3857 is defined as follows:[14]

PROJCS["WGS 84 / Pseudo-Mercator",
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0,
AUTHORITY["EPSG","8901"]],
UNIT["degree",0.0174532925199433,
AUTHORITY["EPSG","9122"]],
AUTHORITY["EPSG","4326"]],
PROJECTION["Mercator_1SP"],
PARAMETER["central_meridian",0],
PARAMETER["scale_factor",1],
PARAMETER["false_easting",0],
PARAMETER["false_northing",0],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],
AXIS["X",EAST],
AXIS["Y",NORTH],
EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext  +no_defs"],
AUTHORITY["EPSG","3857"]]


## References

1. ^ "WGS 84 and the Web Mercator Projection NGA Office of Geomatics" (PDF). National Geospatial Intelligence Agency. 2014-05-16. Retrieved 2014-08-06.
2. ^ "Google Maps & Earth Help Forum". Retrieved 29 August 2017.
3. ^ "Our Map Data". MapBox. Retrieved June 20, 2018. Mapbox supports the popular Web Mercator projection, and currently does not support any other projections for display.
4. ^ a b Battersby, Sarah E.; Finn, Michael P.; Usery, E. Lynn; Yamamoto, Kristina H. (2014). "Implications of Web Mercator and Its Use in Online Mapping" (PDF). Cartographica. 49 (2): 92. doi:10.3138/carto.49.2.2313.
5. ^ "NGA: (U) NGA Advisory Notice on "Web Mercator" (UNCLASSIFIED)". earth-info.nga.mil. Retrieved 2018-06-07.
6. ^ a b c d "The Google Maps / Bing Maps Spherical Mercator Projection". Alastair Aitchison. Retrieved 4 October 2014.
7. ^ "NGA: (U) NGA Advisory Notice on "Web Mercator" (UNCLASSIFIED)". Retrieved 4 October 2014.
8. ^ "OpenStreetMap Slippy map tilenames". openstreetmap.org. Retrieved 2018-11-14.
9. ^ http://www.epsg-registry.org/report.htm?type=selection&entity=urn:ogc:def:crs:EPSG::3857&reportDetail=short&style=urn:uuid:report-style:default-with-code&style_name=OGP%20Default%20With%20Code&title=EPSG:3857
10. ^ Strebe, Daniel. "Mapthematics Forums". mapthematics.com.
11. ^ http://www.sharpgis.net/post/2008/05/15/SphericalWeb-Mercator-EPSG-code-3785