When I'm using PostGIS for transforming coordinates from WGS 84 (EPSG 4326) to Web Mercator (EPSG 3857) the result for
POINT(-180 0) is
POINT(-20037508.3427892 -7.08115455161362e-010) and for
POINT(180 0) it is
As I understood the Web Mercator projection there is a square that displays a stretched sphere. So when converting from 4326 to 3857 the WGS globe coordinates will be transformed to square raster coordinates. There is a specific formula for that, but the absolute result depends on the given width (height) of the raster square.
At PostGIS it seems there is a width of
40075016.6855784 assumed. Is that just a magic number defined by PostGIS developers or is it a kind of standard value? Is there a standard for
-180 => -width / 2 and
+180 => +width / 2 or would
-180 => 0 and
+180 => width also be "OK"? I mean at the end it's just a translation, isn't it?