<div dir="auto"><div>Ok, Thanks for your detailed explanation! <br><div class="gmail_extra"><br><div class="gmail_quote">On 5 Mar 2018 15:41, "Kristian Evers" <<a href="mailto:kreve@sdfe.dk">kreve@sdfe.dk</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It would be nice if the Web Mercator was never introduced to the EPSG register,<br>
but nothing we can do about that now. The problem has indeed seeped into<br>
PROJ by mistake (will be fixed with 5.0.1). Unfortunately the internal architecture<br>
in PROJ makes it quite hard to handle both the Web Mercator and treat other<br>
(not so common) transformations with a shift in ellipsoid correctly. Luckily<br>
this is only a problem in the old API. The new API introduced in 5.0.0 is more<br>
flexible and can handle both correctly. It will be a while before that is easily<br>
available for downstream projects such as QGIS.<br>
<br>
/Kristian<br>
<br>
<br>
-----Oprindelig meddelelse-----<br>
Fra: Qgis-user [mailto:<a href="mailto:qgis-user-bounces@lists.osgeo.org">qgis-user-bounces@<wbr>lists.osgeo.org</a>] På vegne af Benjamin Ducke<br>
Sendt: 5. marts 2018 11:58<br>
Til: qgis-user <<a href="mailto:qgis-user@lists.osgeo.org">qgis-user@lists.osgeo.org</a>><br>
<div class="elided-text">Emne: Re: [Qgis-user] Pseudo Mercator(OSM) @ EPSG:4326 bug?<br>
<br>
It all boils down to the same fundamental issue:<br>
Google Earth/Maps, etc. _pretend_ that their data<br>
is WGS84, but they do not implement the WGS84<br>
ellipsoid. So when tools like PROJ attempt to<br>
do the _technically correct_ thing and perform<br>
a datum transformation WGS84 <-> Web Mercator, then<br>
data ends up in the wrong place. If they don't,<br>
then people get confused, because the two systems<br>
are different. This confusion is now seeping into<br>
PROJ and from there into higher-level apps like<br>
QGIS. I wish EPSG had never included Web Mercator into<br>
its database. Then we could just ignore all of this,<br>
use EPSG:4326 and live in blissful ignorance.<br>
<br>
On 05/03/18 11:42, Idan Miara wrote:<br>
> Thanks for you reply,<br>
> Since the problem exist also in 2.18 I don't think it is related with<br>
> PROJ 5.0, Right? <br>
><br>
> On 5 Mar 2018 12:39, "Kristian Evers" <<a href="mailto:kreve@sdfe.dk">kreve@sdfe.dk</a><br>
> <mailto:<a href="mailto:kreve@sdfe.dk">kreve@sdfe.dk</a>>> wrote:<br>
><br>
> If you are using PROJ 5.0.0 it is likely to be caused by this known<br>
> issue:<br>
><br>
> <a href="https://github.com/OSGeo/proj.4/issues/834" rel="noreferrer" target="_blank">https://github.com/OSGeo/proj.<wbr>4/issues/834</a><br>
> <<a href="https://github.com/OSGeo/proj.4/issues/834" rel="noreferrer" target="_blank">https://github.com/OSGeo/<wbr>proj.4/issues/834</a>><br>
><br>
> /Kristian<br>
><br>
> -----Oprindelig meddelelse-----<br>
> Fra: Qgis-user [mailto:<a href="mailto:qgis-user-bounces@lists.osgeo.org">qgis-user-bounces@<wbr>lists.osgeo.org</a><br>
> <mailto:<a href="mailto:qgis-user-bounces@lists.osgeo.org">qgis-user-bounces@<wbr>lists.osgeo.org</a>>] På vegne af Benjamin Ducke<br>
> Sendt: 5. marts 2018 10:18<br>
> Til: <a href="mailto:qgis-user@lists.osgeo.org">qgis-user@lists.osgeo.org</a> <mailto:<a href="mailto:qgis-user@lists.osgeo.org">qgis-user@lists.osgeo.<wbr>org</a>><br>
> Emne: Re: [Qgis-user] Pseudo Mercator(OSM) @ EPSG:4326 bug?<br>
><br>
> Could it be this:<br>
><br>
> <a href="http://proj4.org/faq.html#changing-ellipsoid-why-can-t-i-convert-from-wgs84-to-google-earth-virtual-globe-mercator" rel="noreferrer" target="_blank">http://proj4.org/faq.html#<wbr>changing-ellipsoid-why-can-t-<wbr>i-convert-from-wgs84-to-<wbr>google-earth-virtual-globe-<wbr>mercator</a><br>
> <<a href="http://proj4.org/faq.html#changing-ellipsoid-why-can-t-i-convert-from-wgs84-to-google-earth-virtual-globe-mercator" rel="noreferrer" target="_blank">http://proj4.org/faq.html#<wbr>changing-ellipsoid-why-can-t-<wbr>i-convert-from-wgs84-to-<wbr>google-earth-virtual-globe-<wbr>mercator</a>><br>
><br>
> ?<br>
><br>
> The further you get from the equator, the more<br>
> obvious the discrepancy on the Y axis.<br>
><br>
> Best,<br>
><br>
> Ben<br>
><br>
> On 05/03/18 09:38, Idan Miara wrote:<br>
> > Hi,<br>
> ><br>
> > I might have found a bug related to transformation of layer CRS<br>
> > from EPSG:3857 (Pseudo Mercator) to EPSG:4325 (WGS84 Geo).<br>
> > I'm attaching a few images to demonstrate the issue. <br>
> ><br>
> > Steps to reproduce:<br>
> > I've load OSM in QGIS 2.18.16 (or 3.0,same results)<br>
> > via Tile Server (XYZ):<br>
> > <a href="https://a.tile.openstreetmap.org/{z}/{x}/{y}.png" rel="noreferrer" target="_blank">https://a.tile.openstreetmap.<wbr>org/{z}/{x}/{y}.png</a><br>
> <<a href="https://a.tile.openstreetmap.org/{z}/{x}/{y}.png" rel="noreferrer" target="_blank">https://a.tile.openstreetmap.<wbr>org/{z}/{x}/{y}.png</a>><br>
> > <<a href="https://a.tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png" rel="noreferrer" target="_blank">https://a.tile.openstreetmap.<wbr>org/%7Bz%7D/%7Bx%7D/%7By%7D.<wbr>png</a><br>
> <<a href="https://a.tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png" rel="noreferrer" target="_blank">https://a.tile.openstreetmap.<wbr>org/%7Bz%7D/%7Bx%7D/%7By%7D.<wbr>png</a>>><br>
> ><br>
> > Then set the CRS to EPSG:4326 (WGS84 Geo)<br>
> ><br>
> > I've also loaded a global bounds vector layer (EPSG:4326)<br>
> ><br>
> > In scale 1:100,000,000 it seems that the Pseudo Mercator<br>
> transformation<br>
> > to 4326 is flawed, as the OSM and the vectors are not aligned.<br>
> > In scale 1:50,000,000 it seems OK when the extent is the middle of the<br>
> > map, but if I pan to the south/north it seems distorted again.<br>
> ><br>
> > If I set the project CRS to EPSG:3857 (Pseudo Mercator) as the CRS of<br>
> > the OSM tiles, so the vector layer would be transformed instead, then<br>
> > they do align in all scales (picture with the blue vector layer).<br>
> ><br>
> > It doesn't look like a problem of precision of the transformation from<br>
> > 3857 to 4325 because it's way off. <br>
> > Is that a bug or am I missing something here?<br>
> ><br>
> > Kind regards,<br>
> > Idan.<br>
> ><br>
> ><br>
> ><br>
> > ______________________________<wbr>_________________<br>
> > Qgis-user mailing list<br>
> > <a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a> <mailto:<a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.<wbr>org</a>><br>
> > List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-user</a><br>
> <<a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-user</a>><br>
> > Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-user</a><br>
> <<a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-user</a>><br>
> ><br>
><br>
><br>
><br>
> --<br>
> Dr. Benjamin Ducke<br>
> Deutsches Archäologisches Institut (DAI)<br>
> Zentrale Berlin, IT-Referat<br>
> * Projekt "Stunde Null" *<br>
> ______________________________<wbr>_________________<br>
> Qgis-user mailing list<br>
> <a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a> <mailto:<a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.<wbr>org</a>><br>
> List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-user</a><br>
> <<a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-user</a>><br>
> Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-user</a><br>
> <<a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-user</a>><br>
> ______________________________<wbr>_________________<br>
> Qgis-user mailing list<br>
> <a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a> <mailto:<a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.<wbr>org</a>><br>
> List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-user</a><br>
> <<a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-user</a>><br>
> Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-user</a><br>
> <<a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-user</a>><br>
><br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> Qgis-user mailing list<br>
> <a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
> List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-user</a><br>
> Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-user</a><br>
><br>
<br>
<br>
<br>
--<br>
Dr. Benjamin Ducke<br>
Deutsches Archäologisches Institut (DAI)<br>
Zentrale Berlin, IT-Referat<br>
* Projekt "Stunde Null" *<br>
______________________________<wbr>_________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-user</a><br>
______________________________<wbr>_________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-user</a></div></blockquote></div><br></div></div></div>