Web Mercator Projection – One of Cylindrical Projections of an Ellipsoid to a Plane

The Web Mercator projection is a projection of a relatively recent date. There has been a lot of controversy about its application. Some believe that this projection is not a projection of either the sphere or the surface of the ellipsoid. Therefore, in this paper, several projections of the surface of a rotational ellipsoid into a plane are investigated and it is shown that the Web Mercator projection is one of such projections. Namely, although the equations of this projection are identical to the equations for the projection of the sphere, the basic difference is in the choice of the area of definition, i.e., the domain of the projection. Furthermore, we have shown that the Web Mercator projection can also be interpreted as double mapping: mapping an ellipsoid to a sphere according to the normals and then mapping the sphere to the plane according to the formulas of the Mercator projection for the sphere. The Web Mercator projection is not a conformal projection, but it is close in properties to the Mercator projection.


Introduction
In the mid-1990s, Google put on the Internet maps of the world with the ability to zoom to the largest scale. To create any map, including the aforementioned maps known as Google Maps, it is necessary to map the points from the surface of a rotational ellipsoid, which in geodesy and cartography approximate an irregular Earth surface, to a plane using one of the many map projections. Google has used the following procedure for this purpose. Google included ellipsoidal, i.e., geodetic coordinates in the formulas of the normal Mercator projection for mapping a sphere. For the radius of the sphere, the large semi-axis of the ellipsoid WGS84 was taken, which is used worldwide today. The main reason for Google's application ofsuch a procedure are simpler formulas for mapping a sphere and therefore five times faster calculations than direct formulas for mapping ellipsoids (Zinn 2010).
The process described by Google has received numerous criticisms. The fiercest criticism was by the Geodesy Subcommittee ofthe Geomatics Committee ofthe International Association ofOil &Gas Producers -IOGP (known as EPSG according to the code it assigns). The EPSG for that reference system was refused, explaining: "…that it did not want to devalue the EPSG data collection through a system unsuited to geodesy and cartography". However, in 2008 the code EPSG:3785 was assigned with a remark: "…that it was not an official geodetic system, since the Earth is approximated to a sphere, rather than an ellipsoid." With the new EPSG:3857 code assigned the same year it says: "... the WGS84 ellipsoid is applied rather than a sphere". In version 8.7 of8 September 2014, a comment is given: "Uses spherical development of ellipsoidal coordinates. Relative to WGS84 / World Mercator (CRS code 3395) errors of0.7 percent in scale and differences in northing ofup to 43 km in the map (equivalent to 21 km on the ground) may arise" (EPSG 2014). In the above sentence, the word errors is mentioned, which is not in line with the theory ofmap projections, because there are distortions, not errors.
The above quotations show how long it took EPSG to determine that the Web Mercator projection was not a mapping of a sphere, but an ellipsoid, and that 43 km between the parallels was the difference between the Mercator and the Web Mercator, and not the error ofthe Web Mercator projection. Because ofthe reputation that EPSG enjoys in the world, many have quoted their statements, considering them inviolable (Favretto 2014).
The lack of a Web Mercator projection comes to the fore practically only on the smallest scale when the whole world, or most ofit, is visible on the screen. Then we are bothered by large distortions of surfaces, especially in the northern parts of the Earth's sphere. Cartographers often cite as an example Greenland, which is almost as big on the map as Africa, although it is about 14 times smaller. Therefore, cartographers in recent decades have often warned that the Mercator projection, but also other normal aspect cylindrical projections, are not suitable for making general geographical maps of the world (Committee on Map Projections 1989).
We assume that due to all these criticisms, Google created a new mathematical basis for Google Maps in the middle of 2018 (it is accessible by clicking Globe in the menu). This is most easily seen on a map of the smallest scale. It is no longer a map of the world in the Web Mercator projection, but a map ofthe hemisphere in azimuthal projection. However, the maps ofmedium and large scales that users use the most in determining the route between two points are still in the Web Mercator projection (Frančula 2019).
The content of this paper is organized as follows. After the introduction, the second section recalls the geodetic parameterization ofthe rotational ellipsoid, and the third, very briefly, the projections of the ellipsoid surface into the plane. The fourth section is devoted to cylindrical projections of ellipsoids because the Web Mercator projection belongs to this group of projections. The fifth section gives examples of equidistant, equivalent, conformal and perspective projections of an ellipsoid, so that it can be naturally concluded that the Web Mercator projection referred to in the sixth section belongs to the same group of projections. In the seventh section we show that the Web Mercator projection can also be interpreted as double mapping consisting of mapping an ellipsoid to a sphere and then a sphere to a plane. In the eighth section we give a comparison of the Mercator and Web Mercator projections, and in the ninth we draw conclusions about the conducted research.
2 Geodetic parameterization of a rotational ellipsoid A rotational ellipsoid with semi-axes a and b and the centre at the origin of a rectangular spatial coordinate system has the equation (1) This surface can also be experienced as an image of the mapping described by the formulas Mapping (2)-(4) is called geodetic parameterization of a rotational ellipsoid (1), and it allows us to identify points with coordinates (X, Y, Z) on the surface of the ellipsoid with points corresponding to geodetic coordinates ( , ).
Nije teško dobiti prvu diferencijalnu formu preslikavanja (2) gdje je Map projection is usually defined as mapping the surface ofan ellipsoid into a plane using the formulas x x( , ), y y( , ), where x and y are coordinates in the rectangular (mathematical, right-oriented) coordinate system in the plane, while , are geodetic coordinates, the latitude and longitude. Thus, we mentally identified the points on the ellipsoid (1) with their geodetic coordinates (4) based on their connection (2). It is clear that theoretically there are an infinite number of mappings (7), although they cannot be arbitrary in order for the result to be as we usually experience it. It is usually assumed that the functions in the expression (7) are continuous and derivable in parts.
The first differential form of mapping (7) is where coefficients are detic longitude of the central meridian, , and functions (11) are continuous and monotonically increasing. In this case, as with any map projection, the x and y are coordinates ofa point in a rectangular (mathematical, right) coordinate system in the plane. As can be easily seen, this is a mapping to a plane, not to a cylinder surface.
According to (9), for cylindrical projections (11) we have (12) so according to (8), (9) and (12) the first differential form of this mapping is The square of the local scale factor c for the cylindrical projections of the ellipsoid into the plane (11) is therefore From (14) it is easy to obtain the local linear scale factor in the direction of a meridian (d 0) (15) and the local linear scale factor in the direction of a parallel (d 0) where The factor ofthe local linear scale c for mapping (7) is defined in the theory ofmap projections by the relation and is important in determining distortions or deformations caused by projection.

Cylindrical projections
Some ofthe map projections are cylindrical and we will continue to deal only with such in this paper. Cylindrical projections in the normal aspect or normal cylindrical projections are such projections in which the images ofthe parallels ofa normal network are mutually parallel straight segments, and the images ofthe meridians, straight lines perpendicular to the images of the parallels (Tobler 1962). Cylindrical projections in which the images ofthe meridians are distant from the image of the middle meridian of the mapping area in proportion to the difference of their longitudes will be called conventional cylindrical projections.
The local area scale factor is (17) The known formula applies to the maximum distortion of the angle where and are the geodetic latitude and longitude, respectively, K, 0 and 0 are constants, and M the radius of meridian curvature defined by the relation (6). The integral in (19) represents the length of the meridian arc; it is an elliptical integral that cannot be expressed using elementary functions. The geodetic latitude 0 can be chosen arbitrarily. With the choice of 0 0, the equator will be mapped to the coordinate axis x. IfK a, the length ofthe images ofall parallels will be 2aπ.
It is easy to see that from (19) it follows i.e., it is really an equidistant projection along the meridians. For that projection we have (20) 5.2 Equal-area or Lambert cylindrical projection of an ellipsoid An equal-area cylindrical projection of an ellipsoid is defined by the equations (21)   (22)   (23) where and are the geodetic latitude and longitude, respectively, K, 0 and 0 are constants, M the radius of meridian curvature defined by the relation (6), and N the radius ofcurvature ofthe intersection along the first vertical defined by (3). The integral in (23) represents the area ofthe ellipsoidal trapezium with the sides 1 and 0 . This integral can be expressed using elementary functions, so instead of(23) we can write (24) The constant 0 can be chosen arbitrarily. With the choice of 0 0, the equator will be mapped on the x-axis.
Based on (24) we can calculate (25) and then p hk 1, i.e., it is really an equal-area projection. For that projection we have

Conformal or Mercator cylindrical projection of an ellipsoid
A conformal cylindrical projection of an ellipsoid is defined by the equations where and are the geodetic latitude and longitude, respectively, K, 0 and 0 are constants, M the radius of meridian curvature defined by (6), and N radius ofcurvature ofthe intersection along the first vertical defined by (3). The constant 0 can be chosen arbitrarily. With the choice of 0 0, the equator will be mapped on the x-axis. The integral in tj. stvarno je riječ o ekvivalentnoj projekciji. Za tu je projekciju Na temelju (24) možemo izračunati It is immediately apparent that this projection is neither equidistant, nor equivalent, nor conformal. If K a, then the equator is a standard parallel, i.e., for points on the equator h = k = 1.

Web Mercator projection of an ellipsoid
The Web Mercator projection adapted to raster data is defined by the equations (29)   (30) i.e., that it is really a conformal projection. For that projection we have For K a along the equator, it will be h k 1, i.e., the equator will be the standard parallel.
For K N( 1 )cos 1 the standard parallel will be the parallel with the geodetic latitude 1 . Thus, a change in the constant K is on the one hand a change in the standard parallel, and at the same time a change in the scale of the map.
Many authors define the Mercator projection of an ellipsoid by putting K a (Thomas 1952, Snyder 1987, Osborne 2013 and others). However, this may not always be the case. Let us recall the so-called mean latitude used in the production of nautical charts (Kavrayskiy 1959, Peterca et al. 1974, Vahrameyeva et al. 1986, Bugayevskiy 1998. It is the geodetic latitude of that parallel which passes through the central part ofthe nautical chart and which is the standard parallel for that sheet ofthe chart. Based on this latitude, the constant K is determined in the equations of the Mercator projection and this way the distribution ofdistortions on the map is influenced.

Perspective projection of an ellipsoid to the cylindrical surface
A perspective projection of an ellipsoid to the circular cylindrical surface having radius K, and whose axis is the coordinate axis z is defined by the equations x K( 0 ), y K(1 e 2 )tan .
In this case, and are the geodetic latitude and longitude, respectively, 0 is a constant.
It is easy to derive (28) is the integral of isometric latitude which can be expressed by elementary functions in several ways: It is easy to see that where and are the geodetic latitude and longitude, respectively, and n is the zoom level (Wikipedia 2020). Table 1 provides basic information regarding the zoom levels of the Web Mercator projection.
The "Number of tiles" column gives the number of tiles needed to display the entire world with the given zoom level. This can be useful for calculating the amount of memory needed to store the previously generated tiles.
The "Tile width in degrees" column gives the map width in degrees of ellipsoidal length for a square tile at a specific zoom level.
In degrees it is [-180°, 180°] for geodetic longitude and [-85°05112878, 85°05112878] for geodetic latitude . We are interested how the equations of the Web Mercator projection (39) written in the usual form, i.e., for the application of vector graphics, would look. We first notice the need to change the rectangular coordinate system whose origin is at the point corresponding to the ellipsoidal coordinates ( , ) (0, 0). Furthermore, a link should be established between the raster data expressed in pixels and vector data expressed in metres. It is not difficult to see that the equator will be represented with 256 2 n pixels, and since the equator is a circle of radius a, its circumference in metres is 2aπ.
Taking this into account, equations (39) pass into These equations are similar to the equations of the normal aspect Mercator projection of a sphere whose radius is equal to a (compare equations (28) and (29)). However, it is important to note that and in (40) are not geographical coordinates but geodetic, i.e., ellipsoidal.
At first glance, the zoom level n is lost in (40). However, the equations of other projections are usually written for the 1:1 scale because it is assumed that they can be easily adapted to any scale 1: M.
The resolution ofthe screen on which we look at the map is the ratio of the length of the screen to the number of pixels. For example, if the screen length is 345 mm and the corresponding number of pixels is 1920, the resolution r will be 5.56 pixels per millimetre or 141 pixels per inch. This information is needed to calculate the scale ofthe display. Let us mark the scale ofthe map on the screen with 1: M. Equalize the length of the equator C expressed in pixels from formula (39) C 2x(π) 256 2 n , with the equatorial length at a scale of1: M expressed in pixels as a function of the resolution r (42) and we will get According to formula (43), the denominators M of the scale represented in the last two columns in Table 1 are calculated.
It is not difficult to derive formulas for determining the distortions of the Web Mercator projection: Formula (46) shows that the largest ratio of the linear scale factor is along the equator and that it is It is immediately apparent that this projection is neither equidistant, nor equal-area, nor conformal.

The proportionality factor
The values in the column "Pixel width expressed in metres" were calculated for a = 6378137 m, which is the major semi-axis ofthe ellipsoid WGS84. The "Map scale denominator M on the screen" is calculated for the two assumed screen resolutions in which we view the map: 141 pixels / inch and 96 pixels / inch (40) Po formuli (43) izračunani su nazivnici mjerila M u posljednja dva stupca u tablici 1.
By definition, for the Web Mercator projection there is 0 0 (EPSG 2014), so we have which are the already known formulas (42) and (43) but now derived in another way.
In mid-2018, Google Maps was available online on a new mathematical basis. This is most easily seen on a map of the smallest scale. It is no longer a map of the world in the Web Mercator projection, but a map ofthe hemisphere in azimuthal projection (Frančula 2019).
Let us mention at the end that one can also find the unusual claim that the Web Mercator projection is neither strictly ellipsoidal nor strictly spherical (Wikipedia 2020). However, there should be no doubt because the domain ofdefinition ofthat projection is the surface of a rotational ellipsoid. Therefore, it is a projection of an ellipsoid into a plane.
7 Web Mercator projection as double mapping Stefanakis (2017) describes the origin of the Web Mercator projection in which ellipsoidal coordinates are included in the formulas ofthe Mercator projection for the sphere. He writes, "Notice that the ellipsoidal coordinates ofany point P were never transformed to spherical. Apparently, Google developers wanted to reduce the computational cost oftransformations at the server side." Stefanakis (2017) is wrong when he says that coordinates from an ellipsoid are never transformed coordinates on a sphere. Namely, the described Google procedure by which ellipsoidal coordinates are substituted in the formulas of the normal aspect Mercator projection for mapping a sphere can be interpreted as a double projection of an ellipsoid into a plane. First the ellipsoid is mapped onto the sphere provided that the geographic coordinates on the sphere are equal to the geodetic coordinates on the ellipsoid and then the sphere is conformally mapped into the plane. To our knowledge, no one has interpreted the Web Mercator projection this way so far. In Figure 1 (Figure 7 in Stefanakis (2017)) the points from the ellipsoid are mapped onto a Web Mercator projection through the opaque funnel of spherical formulas, although the figure includes the sphere.
Instead of a funnel there should have been a sphere (Figure 2).
Let the mapping from a rotational ellipsoid with a large semiaxis a to a sphere of radius R be given as follows: R a (49) ' and ' .
8 Comparison of the Mercator and the Web Mercator projection Table 2 compares the local linear scale factors along meridians and parallels and the maximum angle distortion between the Mercator and Web Mercator projection. The Mercator projection for which the standard parallel is the equator (K a) was chosen.
Bildirici (2015) has a similar table. Vasilca et al. (2018) investigated the differences between the Mercator and Web Mercator projections by correctly warning that they should not be equated even though they have similar names. They compared the formulas of both projections, the coordinates of a certain number ofpoints and the borders ofRomania on the maps in both projections. In conclusion, they point out: "The Web Mercator projection features significant differences from the Mercator projection in the following aspects: the reference surface is a sphere and not an ellipsoid; …", which is not true. The reference surface in both projections is the ellipsoid WGS84.

Conclusion
In this paper, we investigated several projections ofthe surface ofa rotational ellipsoid into a plane. We have shown that the Web Mercator projection is not a projection of a sphere onto a plane, because its domain of definition is the surface of an ellipsoid. Thus, it is one ofthe projections ofa rotational ellipsoid in a plane although its equations are identical to the equations for the projection of a sphere. Although the equations are the same at first glance, the difference is in the area of definition of the projection. Unlike other ellipsoid projections in which the distortion distribution can be regulated by selecting the parameter we have denoted by K in this paper, in the Web Mercator projection this is not possible, because the distortion distribution is fixed. However, this is not a disadvantage because, as with all other projections, the effect of distortion can and must be removed.
The Web Mercator projection can also be interpreted as a double mapping: mapping an ellipsoid to a sphere according to normals and then mapping a sphere to a plane according to the formulas of a Mercator projection for a sphere.
The Web Mercator projection is not a conformal projection, but it is close in properties to the Mercator projection. Naturally, the idea of web-equidistant, web-Lambert and similar projections is now emerging. These projections would be created by taking equations for mapping a sphere and substituting geodetic coordinates in them instead ofgeographical ones.
This way we would get approximately equidistant, approximately equal-area, etc. projections. This could be the subject offurther research.