<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">Le 01/12/2021 à 22:57, Andrew Patterson
a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CAC8biO3VBb-+TgAVmh=6_o9tb4aHzF=1SmUBshLftLacY2uXnA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div class="gmail_quote">
<div>Even,</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
That one is a very odd beast. The <br>
PARAMETER["latitude_of_center",6.64456744726493] is
completely <br>
inconsistant with the name "WGS_84_Pseudo_Mercator". I see
GDAL 2.4 <br>
honoured this latitude of center, as gdalsrsinfo on it
returns <br>
+proj=merc +lon_0=0 +lat_ts=6.64456744726493 +x_0=0 +y_0=0
+ellps=WGS84 <br>
+towgs84=0,0,0,0,0,0,0 +units=m +no_defs. Newer PROJ
versions have a <br>
heustistics that only look at the name
WGS_84_Pseudo_Mercator and ignore <br>
the projection parameters to decide to use the official
EPSG:3857 "WGS <br>
84 / Pseudo-Mercator" definition. One could argue it is a
bug to ignore <br>
the latitude_of_center parameter, but this definition is
very confusing <br>
to start with. It is hard to know what the intention of the
user was: <br>
use official EPSG:3857 "WGS 84 / Pseudo-Mercator", or use a
modified <br>
version of it...<br>
</blockquote>
<div><br>
</div>
<div>I should say up front that I have nothing invested in any
of these personally -- if they're wrong, that's an answer I
can at least relay back. It'll be ugly in some cases because
we'll have umpteen hundred maps using a questionable WKT
that has to be remedied somehow, but at least I can say
there's no code solution at my end.</div>
<div><br>
</div>
<div>That said, to play devil's advocate, what would the right
way to specify a customized pseudo-mercator look like? It
sounds like you're saying that the PROJCS name is the
problem? I tried changing the name to 'Unknown' and it had
no effect, so either you're talking about a PROJ version
later than 8.1.1 or I'm misunderstanding what you mean.</div>
</div>
</div>
</blockquote>
<p>Actually, I missed that latitude_of_center in PROJ >= 6 is
completely ignored with Mercator_1SP. With Mercator_1SP, the
parameter that matters is the scale_factor. With Mercator_2SP, the
one that matters is standard_parallel_1. So it looks GDAL 2.4
interpreted somehow this latitude_of_center as the +lat_ts
parameter, but I'd say this was an accident. This WKT is
definitely weird.</p>
<p><br>
</p>
<blockquote type="cite"
cite="mid:CAC8biO3VBb-+TgAVmh=6_o9tb4aHzF=1SmUBshLftLacY2uXnA@mail.gmail.com">
<div dir="ltr">
<div class="gmail_quote">
<div><br>
</div>
<div>Of the two cases, this is the one that I feel like there
should be a way to make it work properly. The next map is
sounding more & more like a lousy map to start with.
This one is weird, but it should be feasible (if strange) to
tweak a pseudo-mercator like this, shouldn't it?</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
As far as I can see, GDAL 2.4 can't transform that to a
PROJ.4 string at <br>
all (it doesn't understand the "Mercator" projection), so
I'm not sure <br>
why you get a result at all with it. With recent PROJ,<br>
<br>
$ projinfo <br>
'PROJCS["Popular_Visualisation_CRS_Mercator_deprecated",GEOGCS["GCS_Popular
<br>
Visualisation <br>
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>
<br>
returns<br>
<br>
PROJ.4 string:<br>
+proj=merc +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +R=6378137
+units=m +no_defs <br>
+type=crs<br>
<br>
WKT2:2019 string:<br>
PROJCRS["Popular_Visualisation_CRS_Mercator_deprecated",<br>
BASEGEOGCRS["GCS_Popular Visualisation CRS",<br>
DATUM["Popular Visualisation Datum",<br>
ELLIPSOID["Popular_Visualisation_Sphere",6378137,0,<br>
LENGTHUNIT["metre",1]],<br>
ID["EPSG",6055]],<br>
PRIMEM["Greenwich",0,<br>
ANGLEUNIT["Degree",0.0174532925199433]]],<br>
CONVERSION["unnamed",<br>
METHOD["Mercator (variant B)",<br>
ID["EPSG",9805]],<br>
PARAMETER["Latitude of 1st standard parallel",0,<br>
ANGLEUNIT["Degree",0.0174532925199433],<br>
ID["EPSG",8823]],<br>
PARAMETER["Longitude of natural origin",0,<br>
ANGLEUNIT["Degree",0.0174532925199433],<br>
ID["EPSG",8802]],<br>
PARAMETER["False easting",0,<br>
LENGTHUNIT["metre",1],<br>
ID["EPSG",8806]],<br>
PARAMETER["False northing",0,<br>
LENGTHUNIT["metre",1],<br>
ID["EPSG",8807]]],<br>
CS[Cartesian,2],<br>
AXIS["(E)",east,<br>
ORDER[1],<br>
LENGTHUNIT["metre",1,<br>
ID["EPSG",9001]]],<br>
AXIS["(N)",north,<br>
ORDER[2],<br>
LENGTHUNIT["metre",1,<br>
ID["EPSG",9001]]]]<br>
<br>
Which is a reasonable enough interpretation of this WKT. It
could have <br>
potentially been better recognized as the deprecated
EPSG:3785 (which <br>
PROJ then interprets as EPSG;3857), but there's no
heuristics for that <br>
particular formulation, so it is recognized as classic
Mercator on a <br>
sphere. In practice, it should give identical results to
official <br>
EPSG:3857 "WGS 84 / Pseudo-Mercator", except when a datum
transformation <br>
is involved. So if you transform between WGS 84 and this,
you should get <br>
correct results. But results off by 26 km are beyond an
ignored datum <br>
shift (differences should be off by a few hundred of meters
max), so I'm <br>
not sure why you observe this.<br>
</blockquote>
<div><br>
</div>
<div>That actually explains something one of our QA told me.
He said there was an unnamed conversion in there but I
wasn't seeing -- I guess he was using WKT2!</div>
</div>
</div>
</blockquote>
<p>The name of the CONVERSION when exporting as WKT2 is only
informational. It has no computational consequence. When importing
a WKT1 string, PROJ will use "unnamed" as the CONVERSION name as
the information isn't present.<br>
</p>
Even<br>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</body>
</html>