[gdal-dev] Spherical Mercator Projection mismatching major/minor axis

Even Rouault even.rouault at spatialys.com
Fri Nov 6 11:24:22 PST 2020


Craig,

> The way I handle it is (slightly older notation):
> 
> PROJCS["WGS84 / Spherical Mercator",
>     GEOGCS["WGS84basedSpheric_GCS",
>         DATUM["WGS84basedSpheric_Datum",
>             SPHEROID["WGS84based_Sphere", 6378137, 0]],
>         PRIMEM["Greenwich", 0],
>         UNIT["degree", 0.0174532925199433]],
>     PROJECTION["Mercator"],
>     PARAMETER["latitude_of_origin", 0],
>     PARAMETER["central_meridian", 0],
>     PARAMETER["false_easting", 0],
>     PARAMETER["false_northing", 0],
>     UNIT["meter", 1],
>     AUTHORITY["EPSG", "3857"]]
> 

The above WKT using plain Mercator and a sphere definition could potentially 
result in incorrect datum transformation being done by some systems if 
transforming coordinates from a non-WGS84 based CRS to this definition 
(actually just testing it with PROJ >= 6 or GDAL <= 2.4, it rejects its 
because it doesn't know the 'Mercator' projection method. Should be 
'Mercator_1SP' for the WKT1 dialect that GDAL/PROJ speaks)

Jukka was quite correct: EPSG:3857 is defined on the WGS 84 datum, but the 
projection method to use is spherical mercator, that is forcing flattening to 
0. See https://epsg.org/crs/wkt/id/3857

> Will GDAL accept a "0" for the inverse of flattening to represent a sphere?

Yes. That's the canonical way of expressing a sphere

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list