[gdal-dev] WKT for epsg:3857 generated by epsg_tr.py

Even Rouault even.rouault at mines-paris.org
Fri Dec 14 01:10:05 PST 2012


Selon Pepijn Van Eeckhoudt <pepijn at vaneeckhoudt.net>:

> When running 'epsg_tr.py -wkt 3857', gdal produces the WKT listed below.
> I believe the projection that is stated in the WKT is incorrect though.
> The combination of WGS 84 as base geogcs with Mercator_1SP as projection
> means that the regular ellipsoidal Mercator projection will be used
> which is not correct for web mercator.
>
> In the EPSG database 3857 is defined as using the projection 'Popular
> Visualisation Pseudo Mercator' projection which is distinct from the
> regular mercator projection. It's equivalent to 'apply spherical
> mercator to ellipsoidal coordinates'. To indicate this distinction in
> the WKT I think the projection should be something different than
> 'Mercator_1SP'. Mercator_1SP_Spherical, Mercator_1SP_Google or
> Popular_Visualisation_Pseudo_Mercator for instance.
>
> Is my understanding of this correct?

I also believe that the current WKT definition is known to be a bit hackish (is
there some official/generally agreed name for the projection that should be used
?). But you are probably using not the most recent version of GDAL, since recent
versions include a PROJ4 EXTENSION node that will have the correct definition
for EPSG:3857 (which has been hardcoded)

With current trunk (and likely 1.9, but I haven't checked) :

C:gdal_trunkgdal>python swigpythonscriptsepsg_tr.py 3857
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"]]









More information about the gdal-dev mailing list