[GIS] Spherical Mercator – World bounds

coordinate systemextentsfme

What are the correct world bounds in the Spherical Mercator projection (EPSG:3857 and EPSG:900913)

In some source I got those bounds see this link in the maxExtent parameter:

minx: -20037508.3427892
miny: -20037508.3427892
maxx: 20037508.3427892
maxy: 20037508.3427892

However in FME, I got those bounds:

minx: -40075016.6855785
miny: -20037508.3427892
maxx: 40075016.6855785
maxy: 20037508.3427892

Best Answer

The bounds for EPSG 3857 are:

xmin: -PI * 6378137,
ymin: -PI * 6378137,
xmax:  PI * 6378137,
ymax:  PI * 6378137

which result in the following bounds:

xmin: -20037508.3427892,
ymin: -20037508.3427892,
xmax: 20037508.3427892,
ymax: 20037508.3427892

Source: https://epsg.io/3857

  • The extent is a square. And, the unit is in SI meter.
  • OpenLayer sets this bound for you by default when you work with a data source that is in EPSG 3857.
  • If you regularly perform (sizeable) map caching or map tile generation - knowing where the bounds are lets you have fine control over the tools you use, and thus planning, monitoring, concurrent/parallel generations, and etc.
  • If you write codes that convert coordinates to map tile indexes and vice-versa - you need to know where the bounds are.
  • However, do note that the valid geodetic bounds (i.e., latitude and longitude) that can be projected into EPSG 3857 are [xmin, ymin, xmax, ymax] = [-180, -85.06, 180, 85.06].