[PROJ] Pseudo-mercator

Andrew Patterson andrew at avenza.com
Wed Dec 1 12:51:34 PST 2021


Even,

That seems like a logical suggestion!

This is the WKT for the map that's off by ~75km. That 'latitude_of_center'
seems to be contributing at the very least, but as I said before, there
appears to be more to it than that because without it there's still a
~0.18deg latitude shift.

PROJCS["WGS_84_Pseudo_Mercator",GEOGCS["WGS
84",DATUM["wgs_1984",SPHEROID["WGS
1984",6378137,298.257223563],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]],PROJECTION["Mercator_1SP"],PARAMETER["false_easting",0],PARAMETER["false_northing",0],PARAMETER["latitude_of_center",6.64456744726493],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],UNIT["Meter",1,AUTHORITY["EPSG","9001"]]]

This is the WKT for the map that's off by ~26km:

PROJCS["Popular_Visualisation_CRS_Mercator_deprecated",GEOGCS["GCS_Popular
Visualisation
CRS",DATUM["D_Popular_Visualisation_Datum",SPHEROID["Popular_Visualisation_Sphere",6378137,0]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Mercator"],PARAMETER["central_meridian",0],PARAMETER["false_easting",0],PARAMETER["false_northing",0],PARAMETER["standard_parallel_1",0],UNIT["Meter",1]]

Looking at it more closely, I'm not sure it actually is a pseudo-mercator
map. I think I say 'populator visualisation' and assumed it was. But it
_is_ off by ~26km after moving from 2.4/6/1 -> 3.3/8.1.1

This is the WKT for a map that saw no change between GDAL/PROJ versions:

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["Easting",EAST],AXIS["Northing",NORTH],EXTENSION["PROJ4","+proj=merc
+a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m
+nadgrids=@null +wktext +no_defs"],AUTHORITY["EPSG","3857"]]

I should be able to dig up more -- I'm told we have a rather huge host of
files like that first WKT that are affected.

On Wed, Dec 1, 2021 at 3:35 PM Even Rouault <even.rouault at spatialys.com>
wrote:

> Andrew,
>
> for anyone to be able to help you, you should provide more reproducible
> material, and namely the WKT that works and which don't. and possibly GDAL
> or PROJ command line invokations to reproduce issues
>
> Even
> Le 01/12/2021 à 21:24, Andrew Patterson a écrit :
>
> Hello!
>
> We recently made the jump from GDAL 2.4 to 3.3.0 and while we had some
> major headaches initially, in the end they boiled down to a single
> (unnecessary) function call that resulted in an issue filed against GDAL.
> The fix, by the way, was supplied within three or four hours, which is an
> amazing turnaround time (and greatly appreciated by me)!
>
> Since then, we've released our app (Avenza Maps) and immediately run
> headlong into recurring issues with pseudo-mercator that I'm not sure how
> to solve. In our previous version (using GDAL 2.4 & PROJ 6.1) we had
> various pseudo-mercator maps that worked fine. When we upgrade to our
> version running GDAL 3.3.0 & PROJ 8.1.1, many of these maps find their
> referencing shifted. In one case, it was shifted toward the equator ~26km.
> In another, the referencing is off by ~75km.
>
> The former has 'deprecated' in its name -- though I know that's mostly a
> cosmetic property -- but it made me wonder if there's some issue with these
> deprecated versions of pseudo-mercator. We've seen other issues with these
> 'off brand' pseudo-mercator projections as well, but it's not clear if it's
> that they're not as well supported any more or if there's something in
> those WKTs that is problematic.
>
> The latter one seems to be influenced by what appears to be a dropped
> parameter: the WKT specifies a latitude_of_origin but when I asked the
> resultant ORGSpatialReference to read the WKT back to me it's not included.
> If I eliminate that parameter from the WKT in our previous app (using
> 2.4/6.1) I get a similar-ish result to the one in the current version
> (using 3.3/8.1.1). That seems like it might be a bug about not considering
> latitude_of_origin for pseudo-mercator when it should, but even if that's
> true, the latitude is off by ~0.15 degrees so there's an additional
> component.
>
> To further confuse matters, we also have other pseudo-mercator maps that
> work as well as before. I'm well versed enough in GIS from years of
> exposure that I feel like I'd be able to spot obvious problems, but I'm not
> seeing anything that jumps out at me. I'm hoping someone on this list has
> experience and knowledge of how PROJ handles pseudo-mercator and can lend
> me some guidance on what to do. I've figuratively got management breathing
> down my neck on this and I'm running out of leads to pursue.
>
> Any help would be greatly appreciated!
>
> ..............................
> Andrew Patterson
> Lead Software Architect
> Avenza Systems Inc.
>
> email: andrew at avenza.com
> phone: 416.487.5116
>
> _______________________________________________
> PROJ mailing listPROJ at lists.osgeo.orghttps://lists.osgeo.org/mailman/listinfo/proj
>
> -- http://www.spatialys.com
> My software is free, but my time generally not.
>
> _______________________________________________
> PROJ mailing list
> PROJ at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/proj
>


-- 
..............................
Andrew Patterson
Lead Software Architect
Avenza Systems Inc.

email: andrew at avenza.com
phone: 416.487.5116
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20211201/4e0a7196/attachment-0001.html>


More information about the PROJ mailing list