<div dir="ltr"><div dir="ltr">Even,<div><br></div><div>That seems like a logical suggestion!</div><div><br></div><div>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.</div><div><br></div><div>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"]]]<br></div><div><br></div><div>This is the WKT for the map that's off by ~26km:</div><div><br></div><div>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]]<br></div><div><br></div><div>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</div><div><br></div><div>This is the WKT for a map that saw no change between GDAL/PROJ versions:</div><div><br></div><div>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"]]<br></div><div><br></div><div>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.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Dec 1, 2021 at 3:35 PM Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p>Andrew,</p>
<p>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</p>
<p>Even<br>
</p>
<div>Le 01/12/2021 à 21:24, Andrew Patterson
a écrit :<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hello!
<div><br>
</div>
<div>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)!</div>
<div><br>
</div>
<div>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. </div>
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>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.<br>
<br>
Any help would be greatly appreciated!<br>
<br>
<div dir="ltr">
<div dir="ltr">
<div><span style="font-size:12.8px">..............................</span><br>
</div>
<div>Andrew Patterson</div>
<div>Lead Software Architect</div>
<div>Avenza Systems Inc.</div>
<div><br>
</div>
<div>email: <a href="mailto:andrew@avenza.com" target="_blank">andrew@avenza.com</a></div>
<div>phone: 416.487.5116 </div>
</div>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
PROJ mailing list
<a href="mailto:PROJ@lists.osgeo.org" target="_blank">PROJ@lists.osgeo.org</a>
<a href="https://lists.osgeo.org/mailman/listinfo/proj" target="_blank">https://lists.osgeo.org/mailman/listinfo/proj</a>
</pre>
</blockquote>
<pre cols="72">--
<a href="http://www.spatialys.com" target="_blank">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</div>
_______________________________________________<br>
PROJ mailing list<br>
<a href="mailto:PROJ@lists.osgeo.org" target="_blank">PROJ@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/proj" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/proj</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><span style="font-size:12.8px">..............................</span><br></div><div>Andrew Patterson</div><div>Lead Software Architect</div><div>Avenza Systems Inc.</div><div><br></div><div>email: <a href="mailto:andrew@avenza.com" target="_blank">andrew@avenza.com</a></div><div>phone: 416.487.5116 </div></div></div></div>