Re: Pseudo Mercator(OSM) @ EPSG:4326 bug?

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Pseudo Mercator(OSM) @ EPSG:4326 bug?

Idan Miara
Hi,

I might have found a bug related to transformation of layer CRS from EPSG:3857 (Pseudo Mercator) to EPSG:4325 (WGS84 Geo).
I'm attaching a few images to demonstrate the issue. 

Steps to reproduce:
I've load OSM in QGIS 2.18.16 (or 3.0,same results)
via Tile Server (XYZ):

Then set the CRS to EPSG:4326 (WGS84 Geo)

I've also loaded a global bounds vector layer (EPSG:4326)

In scale 1:100,000,000 it seems that the Pseudo Mercator transformation to 4326 is flawed, as the OSM and the vectors are not aligned.
In scale 1:50,000,000 it seems OK when the extent is the middle of the map, but if I pan to the south/north it seems distorted again.

If I set the project CRS to EPSG:3857 (Pseudo Mercator) as the CRS of the OSM tiles, so the vector layer would be transformed instead, then they do align in all scales (picture with the blue vector layer).

It doesn't look like a problem of precision of the transformation from 3857 to 4325 because it's way off. 
Is that a bug or am I missing something here?

Kind regards,
Idan.


_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

PseudoMercator.jpg (9K) Download Attachment
50M_2.jpg (12K) Download Attachment
50M_1.jpg (23K) Download Attachment
100M.jpg (18K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Pseudo Mercator(OSM) @ EPSG:4326 bug?

Benjamin Ducke-4
Could it be this:

http://proj4.org/faq.html#changing-ellipsoid-why-can-t-i-convert-from-wgs84-to-google-earth-virtual-globe-mercator

?

The further you get from the equator, the more
obvious the discrepancy on the Y axis.

Best,

Ben

On 05/03/18 09:38, Idan Miara wrote:

> Hi,
>
> I might have found a bug related to transformation of layer CRS
> from EPSG:3857 (Pseudo Mercator) to EPSG:4325 (WGS84 Geo).
> I'm attaching a few images to demonstrate the issue. 
>
> Steps to reproduce:
> I've load OSM in QGIS 2.18.16 (or 3.0,same results)
> via Tile Server (XYZ):
> https://a.tile.openstreetmap.org/{z}/{x}/{y}.png
> <https://a.tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png>
>
> Then set the CRS to EPSG:4326 (WGS84 Geo)
>
> I've also loaded a global bounds vector layer (EPSG:4326)
>
> In scale 1:100,000,000 it seems that the Pseudo Mercator transformation
> to 4326 is flawed, as the OSM and the vectors are not aligned.
> In scale 1:50,000,000 it seems OK when the extent is the middle of the
> map, but if I pan to the south/north it seems distorted again.
>
> If I set the project CRS to EPSG:3857 (Pseudo Mercator) as the CRS of
> the OSM tiles, so the vector layer would be transformed instead, then
> they do align in all scales (picture with the blue vector layer).
>
> It doesn't look like a problem of precision of the transformation from
> 3857 to 4325 because it's way off. 
> Is that a bug or am I missing something here?
>
> Kind regards,
> Idan.
>
>
>
> _______________________________________________
> Qgis-user mailing list
> [hidden email]
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>



--
Dr. Benjamin Ducke
Deutsches Archäologisches Institut (DAI)
Zentrale Berlin, IT-Referat
* Projekt "Stunde Null" *
_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Pseudo Mercator(OSM) @ EPSG:4326 bug?

b.j.kobben
In reply to this post by Idan Miara

Most likely the service you are using is only able to provide its maptiles in 3857 and does not respond to the QGIS request to provide them in 4326 (or responds, but incorrectly)...

 

 

--

Barend Köbben

 

On 05/03/2018, 09:39, "Qgis-user on behalf of Idan Miara" <[hidden email] on behalf of [hidden email]> wrote:

 

Hi,

 

I might have found a bug related to transformation of layer CRS from EPSG:3857 (Pseudo Mercator) to EPSG:4325 (WGS84 Geo).

I'm attaching a few images to demonstrate the issue. 

 

Steps to reproduce:

I've load OSM in QGIS 2.18.16 (or 3.0,same results)

via Tile Server (XYZ):

 

Then set the CRS to EPSG:4326 (WGS84 Geo)

 

I've also loaded a global bounds vector layer (EPSG:4326)

 

In scale 1:100,000,000 it seems that the Pseudo Mercator transformation to 4326 is flawed, as the OSM and the vectors are not aligned.

In scale 1:50,000,000 it seems OK when the extent is the middle of the map, but if I pan to the south/north it seems distorted again.

 

If I set the project CRS to EPSG:3857 (Pseudo Mercator) as the CRS of the OSM tiles, so the vector layer would be transformed instead, then they do align in all scales (picture with the blue vector layer).

 

It doesn't look like a problem of precision of the transformation from 3857 to 4325 because it's way off. 

Is that a bug or am I missing something here?

 

Kind regards,

Idan.

 


_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Pseudo Mercator(OSM) @ EPSG:4326 bug?

Kristian Evers-2
In reply to this post by Benjamin Ducke-4
If you are using PROJ 5.0.0 it is likely to be caused by this known issue:

https://github.com/OSGeo/proj.4/issues/834

/Kristian

-----Oprindelig meddelelse-----
Fra: Qgis-user [mailto:[hidden email]] På vegne af Benjamin Ducke
Sendt: 5. marts 2018 10:18
Til: [hidden email]
Emne: Re: [Qgis-user] Pseudo Mercator(OSM) @ EPSG:4326 bug?

Could it be this:

http://proj4.org/faq.html#changing-ellipsoid-why-can-t-i-convert-from-wgs84-to-google-earth-virtual-globe-mercator

?

The further you get from the equator, the more
obvious the discrepancy on the Y axis.

Best,

Ben

On 05/03/18 09:38, Idan Miara wrote:

> Hi,
>
> I might have found a bug related to transformation of layer CRS
> from EPSG:3857 (Pseudo Mercator) to EPSG:4325 (WGS84 Geo).
> I'm attaching a few images to demonstrate the issue. 
>
> Steps to reproduce:
> I've load OSM in QGIS 2.18.16 (or 3.0,same results)
> via Tile Server (XYZ):
> https://a.tile.openstreetmap.org/{z}/{x}/{y}.png
> <https://a.tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png>
>
> Then set the CRS to EPSG:4326 (WGS84 Geo)
>
> I've also loaded a global bounds vector layer (EPSG:4326)
>
> In scale 1:100,000,000 it seems that the Pseudo Mercator transformation
> to 4326 is flawed, as the OSM and the vectors are not aligned.
> In scale 1:50,000,000 it seems OK when the extent is the middle of the
> map, but if I pan to the south/north it seems distorted again.
>
> If I set the project CRS to EPSG:3857 (Pseudo Mercator) as the CRS of
> the OSM tiles, so the vector layer would be transformed instead, then
> they do align in all scales (picture with the blue vector layer).
>
> It doesn't look like a problem of precision of the transformation from
> 3857 to 4325 because it's way off. 
> Is that a bug or am I missing something here?
>
> Kind regards,
> Idan.
>
>
>
> _______________________________________________
> Qgis-user mailing list
> [hidden email]
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>



--
Dr. Benjamin Ducke
Deutsches Archäologisches Institut (DAI)
Zentrale Berlin, IT-Referat
* Projekt "Stunde Null" *
_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Pseudo Mercator(OSM) @ EPSG:4326 bug?

Idan Miara
Thanks for you reply,
Since the problem exist also in 2.18 I don't think it is related with PROJ 5.0, Right? 

On 5 Mar 2018 12:39, "Kristian Evers" <[hidden email]> wrote:
If you are using PROJ 5.0.0 it is likely to be caused by this known issue:

https://github.com/OSGeo/proj.4/issues/834

/Kristian

-----Oprindelig meddelelse-----
Fra: Qgis-user [mailto:[hidden email]] På vegne af Benjamin Ducke
Sendt: 5. marts 2018 10:18
Til: [hidden email]
Emne: Re: [Qgis-user] Pseudo Mercator(OSM) @ EPSG:4326 bug?

Could it be this:

http://proj4.org/faq.html#changing-ellipsoid-why-can-t-i-convert-from-wgs84-to-google-earth-virtual-globe-mercator

?

The further you get from the equator, the more
obvious the discrepancy on the Y axis.

Best,

Ben

On 05/03/18 09:38, Idan Miara wrote:
> Hi,
>
> I might have found a bug related to transformation of layer CRS
> from EPSG:3857 (Pseudo Mercator) to EPSG:4325 (WGS84 Geo).
> I'm attaching a few images to demonstrate the issue. 
>
> Steps to reproduce:
> I've load OSM in QGIS 2.18.16 (or 3.0,same results)
> via Tile Server (XYZ):
> <a href="https://a.tile.openstreetmap.org/{z}/{x}/{y}.png" rel="noreferrer" target="_blank">https://a.tile.openstreetmap.org/{z}/{x}/{y}.png
> <https://a.tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png>
>
> Then set the CRS to EPSG:4326 (WGS84 Geo)
>
> I've also loaded a global bounds vector layer (EPSG:4326)
>
> In scale 1:100,000,000 it seems that the Pseudo Mercator transformation
> to 4326 is flawed, as the OSM and the vectors are not aligned.
> In scale 1:50,000,000 it seems OK when the extent is the middle of the
> map, but if I pan to the south/north it seems distorted again.
>
> If I set the project CRS to EPSG:3857 (Pseudo Mercator) as the CRS of
> the OSM tiles, so the vector layer would be transformed instead, then
> they do align in all scales (picture with the blue vector layer).
>
> It doesn't look like a problem of precision of the transformation from
> 3857 to 4325 because it's way off. 
> Is that a bug or am I missing something here?
>
> Kind regards,
> Idan.
>
>
>
> _______________________________________________
> Qgis-user mailing list
> [hidden email]
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>



--
Dr. Benjamin Ducke
Deutsches Archäologisches Institut (DAI)
Zentrale Berlin, IT-Referat
* Projekt "Stunde Null" *
_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Pseudo Mercator(OSM) @ EPSG:4326 bug?

Idan Miara
In reply to this post by b.j.kobben
Thanks for your reply,
How can I check if QGIS is applying the transformation or if it asks the service to provide the tiles in 4326?

On 5 Mar 2018 11:17, <[hidden email]> wrote:

Most likely the service you are using is only able to provide its maptiles in 3857 and does not respond to the QGIS request to provide them in 4326 (or responds, but incorrectly)...

 

 

--

Barend Köbben

 

On 05/03/2018, 09:39, "Qgis-user on behalf of Idan Miara" <[hidden email] on behalf of [hidden email]> wrote:

 

Hi,

 

I might have found a bug related to transformation of layer CRS from EPSG:3857 (Pseudo Mercator) to EPSG:4325 (WGS84 Geo).

I'm attaching a few images to demonstrate the issue. 

 

Steps to reproduce:

I've load OSM in QGIS 2.18.16 (or 3.0,same results)

via Tile Server (XYZ):

 

Then set the CRS to EPSG:4326 (WGS84 Geo)

 

I've also loaded a global bounds vector layer (EPSG:4326)

 

In scale 1:100,000,000 it seems that the Pseudo Mercator transformation to 4326 is flawed, as the OSM and the vectors are not aligned.

In scale 1:50,000,000 it seems OK when the extent is the middle of the map, but if I pan to the south/north it seems distorted again.

 

If I set the project CRS to EPSG:3857 (Pseudo Mercator) as the CRS of the OSM tiles, so the vector layer would be transformed instead, then they do align in all scales (picture with the blue vector layer).

 

It doesn't look like a problem of precision of the transformation from 3857 to 4325 because it's way off. 

Is that a bug or am I missing something here?

 

Kind regards,

Idan.

 


_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Pseudo Mercator(OSM) @ EPSG:4326 bug?

Benjamin Ducke-4
In reply to this post by Idan Miara
It all boils down to the same fundamental issue:
Google Earth/Maps, etc. _pretend_ that their data
is WGS84, but they do not implement the WGS84
ellipsoid. So when tools like PROJ attempt to
do the _technically correct_ thing and perform
a datum transformation WGS84 <-> Web Mercator, then
data ends up in the wrong place. If they don't,
then people get confused, because the two systems
are different. This confusion is now seeping into
PROJ and from there into higher-level apps like
QGIS. I wish EPSG had never included Web Mercator into
its database. Then we could just ignore all of this,
use EPSG:4326 and live in blissful ignorance.

On 05/03/18 11:42, Idan Miara wrote:

> Thanks for you reply,
> Since the problem exist also in 2.18 I don't think it is related with
> PROJ 5.0, Right? 
>
> On 5 Mar 2018 12:39, "Kristian Evers" <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     If you are using PROJ 5.0.0 it is likely to be caused by this known
>     issue:
>
>     https://github.com/OSGeo/proj.4/issues/834
>     <https://github.com/OSGeo/proj.4/issues/834>
>
>     /Kristian
>
>     -----Oprindelig meddelelse-----
>     Fra: Qgis-user [mailto:[hidden email]
>     <mailto:[hidden email]>] På vegne af Benjamin Ducke
>     Sendt: 5. marts 2018 10:18
>     Til: [hidden email] <mailto:[hidden email]>
>     Emne: Re: [Qgis-user] Pseudo Mercator(OSM) @ EPSG:4326 bug?
>
>     Could it be this:
>
>     http://proj4.org/faq.html#changing-ellipsoid-why-can-t-i-convert-from-wgs84-to-google-earth-virtual-globe-mercator
>     <http://proj4.org/faq.html#changing-ellipsoid-why-can-t-i-convert-from-wgs84-to-google-earth-virtual-globe-mercator>
>
>     ?
>
>     The further you get from the equator, the more
>     obvious the discrepancy on the Y axis.
>
>     Best,
>
>     Ben
>
>     On 05/03/18 09:38, Idan Miara wrote:
>     > Hi,
>     >
>     > I might have found a bug related to transformation of layer CRS
>     > from EPSG:3857 (Pseudo Mercator) to EPSG:4325 (WGS84 Geo).
>     > I'm attaching a few images to demonstrate the issue. 
>     >
>     > Steps to reproduce:
>     > I've load OSM in QGIS 2.18.16 (or 3.0,same results)
>     > via Tile Server (XYZ):
>     > https://a.tile.openstreetmap.org/{z}/{x}/{y}.png
>     <https://a.tile.openstreetmap.org/{z}/{x}/{y}.png>
>     > <https://a.tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png
>     <https://a.tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png>>
>     >
>     > Then set the CRS to EPSG:4326 (WGS84 Geo)
>     >
>     > I've also loaded a global bounds vector layer (EPSG:4326)
>     >
>     > In scale 1:100,000,000 it seems that the Pseudo Mercator
>     transformation
>     > to 4326 is flawed, as the OSM and the vectors are not aligned.
>     > In scale 1:50,000,000 it seems OK when the extent is the middle of the
>     > map, but if I pan to the south/north it seems distorted again.
>     >
>     > If I set the project CRS to EPSG:3857 (Pseudo Mercator) as the CRS of
>     > the OSM tiles, so the vector layer would be transformed instead, then
>     > they do align in all scales (picture with the blue vector layer).
>     >
>     > It doesn't look like a problem of precision of the transformation from
>     > 3857 to 4325 because it's way off. 
>     > Is that a bug or am I missing something here?
>     >
>     > Kind regards,
>     > Idan.
>     >
>     >
>     >
>     > _______________________________________________
>     > Qgis-user mailing list
>     > [hidden email] <mailto:[hidden email]>
>     > List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>     <https://lists.osgeo.org/mailman/listinfo/qgis-user>
>     > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>     <https://lists.osgeo.org/mailman/listinfo/qgis-user>
>     >
>
>
>
>     --
>     Dr. Benjamin Ducke
>     Deutsches Archäologisches Institut (DAI)
>     Zentrale Berlin, IT-Referat
>     * Projekt "Stunde Null" *
>     _______________________________________________
>     Qgis-user mailing list
>     [hidden email] <mailto:[hidden email]>
>     List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>     <https://lists.osgeo.org/mailman/listinfo/qgis-user>
>     Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>     <https://lists.osgeo.org/mailman/listinfo/qgis-user>
>     _______________________________________________
>     Qgis-user mailing list
>     [hidden email] <mailto:[hidden email]>
>     List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>     <https://lists.osgeo.org/mailman/listinfo/qgis-user>
>     Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>     <https://lists.osgeo.org/mailman/listinfo/qgis-user>
>
>
>
> _______________________________________________
> Qgis-user mailing list
> [hidden email]
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>



--
Dr. Benjamin Ducke
Deutsches Archäologisches Institut (DAI)
Zentrale Berlin, IT-Referat
* Projekt "Stunde Null" *
_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Pseudo Mercator(OSM) @ EPSG:4326 bug?

b.j.kobben
In reply to this post by Idan Miara

You can use a browser to request data from the tileserver, but let me assure you that the OSM tileserver you are using (https://a.tile.openstreetmap.org/{z}/{x}/{y}.png) for sure only supports 3857 (or its quasi-alias 900913), so it’s a lots cause to expect it to provide 4326 tiles. Better work the other way around: have your map/project in 3857 and reproject the 4326 data to that.

 

 

--

Barend Köbben

 

On 05/03/2018, 11:53, "Idan Miara" <[hidden email]> wrote:

 

https://a.tile.openstreetmap.org/{z}/{x}/{y}.png


_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Pseudo Mercator(OSM) @ EPSG:4326 bug?

Andre Joost
In reply to this post by Idan Miara
Am 05.03.18 um 09:38 schrieb Idan Miara:

>   Hi,
>
> I might have found a bug related to transformation of layer CRS from EPSG:3857
> (Pseudo Mercator) to EPSG:4325 (WGS84 Geo).
> I'm attaching a few images to demonstrate the issue.
>
> Steps to reproduce:
> I've load OSM in QGIS 2.18.16 (or 3.0,same results)
> via Tile Server (XYZ):
> https://a.tile.openstreetmap.org/{z}/{x}/{y}.png
>
> Then set the CRS to EPSG:4326 (WGS84 Geo)
>
> I've also loaded a global bounds vector layer (EPSG:4326)
>

Does the vector layer contain the north or south pole? EPSG:3857 does
not like that (it would be in infinity). The same might happen if you
request tiles beyond 85°N/S.

HTH,
Andre Joost


_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Pseudo Mercator(OSM) @ EPSG:4326 bug?

Idan Miara
In reply to this post by Benjamin Ducke-4
Forgive me for not understanding the fine details of the flaws in Web Mercator.
Fast forward back the reality where many tile servers provide tiles in 3857, and 4326 to 3857 seems OK, how can I debug this issue in the inverse transformation?

I guess I could export the OSM map in 3857 to TIF to rule out the possibility that the problem in the tile server, so that I can be sure that QGIS is transforming the raster?


On 5 Mar 2018 12:57, "Benjamin Ducke" <[hidden email]> wrote:
It all boils down to the same fundamental issue:
Google Earth/Maps, etc. _pretend_ that their data
is WGS84, but they do not implement the WGS84
ellipsoid. So when tools like PROJ attempt to
do the _technically correct_ thing and perform
a datum transformation WGS84 <-> Web Mercator, then
data ends up in the wrong place. If they don't,
then people get confused, because the two systems
are different. This confusion is now seeping into
PROJ and from there into higher-level apps like
QGIS. I wish EPSG had never included Web Mercator into
its database. Then we could just ignore all of this,
use EPSG:4326 and live in blissful ignorance.

On 05/03/18 11:42, Idan Miara wrote:
> Thanks for you reply,
> Since the problem exist also in 2.18 I don't think it is related with
> PROJ 5.0, Right? 
>
> On 5 Mar 2018 12:39, "Kristian Evers" <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     If you are using PROJ 5.0.0 it is likely to be caused by this known
>     issue:
>
>     https://github.com/OSGeo/proj.4/issues/834
>     <https://github.com/OSGeo/proj.4/issues/834>
>
>     /Kristian
>
>     -----Oprindelig meddelelse-----
>     Fra: Qgis-user [mailto:[hidden email]
>     <mailto:[hidden email]>] På vegne af Benjamin Ducke
>     Sendt: 5. marts 2018 10:18
>     Til: [hidden email] <mailto:[hidden email]>
>     Emne: Re: [Qgis-user] Pseudo Mercator(OSM) @ EPSG:4326 bug?
>
>     Could it be this:
>
>     http://proj4.org/faq.html#changing-ellipsoid-why-can-t-i-convert-from-wgs84-to-google-earth-virtual-globe-mercator
>     <http://proj4.org/faq.html#changing-ellipsoid-why-can-t-i-convert-from-wgs84-to-google-earth-virtual-globe-mercator>
>
>     ?
>
>     The further you get from the equator, the more
>     obvious the discrepancy on the Y axis.
>
>     Best,
>
>     Ben
>
>     On 05/03/18 09:38, Idan Miara wrote:
>     > Hi,
>     >
>     > I might have found a bug related to transformation of layer CRS
>     > from EPSG:3857 (Pseudo Mercator) to EPSG:4325 (WGS84 Geo).
>     > I'm attaching a few images to demonstrate the issue. 
>     >
>     > Steps to reproduce:
>     > I've load OSM in QGIS 2.18.16 (or 3.0,same results)
>     > via Tile Server (XYZ):
>     > <a href="https://a.tile.openstreetmap.org/{z}/{x}/{y}.png" rel="noreferrer" target="_blank">https://a.tile.openstreetmap.org/{z}/{x}/{y}.png
>     <<a href="https://a.tile.openstreetmap.org/{z}/{x}/{y}.png" rel="noreferrer" target="_blank">https://a.tile.openstreetmap.org/{z}/{x}/{y}.png>
>     > <https://a.tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png
>     <https://a.tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png>>
>     >
>     > Then set the CRS to EPSG:4326 (WGS84 Geo)
>     >
>     > I've also loaded a global bounds vector layer (EPSG:4326)
>     >
>     > In scale 1:100,000,000 it seems that the Pseudo Mercator
>     transformation
>     > to 4326 is flawed, as the OSM and the vectors are not aligned.
>     > In scale 1:50,000,000 it seems OK when the extent is the middle of the
>     > map, but if I pan to the south/north it seems distorted again.
>     >
>     > If I set the project CRS to EPSG:3857 (Pseudo Mercator) as the CRS of
>     > the OSM tiles, so the vector layer would be transformed instead, then
>     > they do align in all scales (picture with the blue vector layer).
>     >
>     > It doesn't look like a problem of precision of the transformation from
>     > 3857 to 4325 because it's way off. 
>     > Is that a bug or am I missing something here?
>     >
>     > Kind regards,
>     > Idan.
>     >
>     >
>     >
>     > _______________________________________________
>     > Qgis-user mailing list
>     > [hidden email] <mailto:[hidden email]>
>     > List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>     <https://lists.osgeo.org/mailman/listinfo/qgis-user>
>     > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>     <https://lists.osgeo.org/mailman/listinfo/qgis-user>
>     >
>
>
>
>     --
>     Dr. Benjamin Ducke
>     Deutsches Archäologisches Institut (DAI)
>     Zentrale Berlin, IT-Referat
>     * Projekt "Stunde Null" *
>     _______________________________________________
>     Qgis-user mailing list
>     [hidden email] <mailto:[hidden email]>
>     <https://lists.osgeo.org/mailman/listinfo/qgis-user>
>     _______________________________________________
>     Qgis-user mailing list
>     [hidden email] <mailto:[hidden email]>
>     <https://lists.osgeo.org/mailman/listinfo/qgis-user>
>
>
>
> _______________________________________________
> Qgis-user mailing list
> [hidden email]
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>



--
Dr. Benjamin Ducke
Deutsches Archäologisches Institut (DAI)
Zentrale Berlin, IT-Referat
* Projekt "Stunde Null" *
_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Pseudo Mercator(OSM) @ EPSG:4326 bug?

Benjamin Ducke-4
On 05/03/18 12:12, Idan Miara wrote:
> Forgive me for not understanding the fine details of the flaws in Web
> Mercator.
> Fast forward back the reality where many tile servers provide tiles in
> 3857, and 4326 to 3857 seems OK, how can I debug this issue in the
> inverse transformation?

I don't think you can. The "fix" would be to force QGIS
to treat all data as WGS:4326 (see again the link I
provided in my first answer).

That seems to be the reality of this mess.

Best,

Ben

>
> I guess I could export the OSM map in 3857 to TIF to rule out the
> possibility that the problem in the tile server, so that I can be sure
> that QGIS is transforming the raster?
>
>
> On 5 Mar 2018 12:57, "Benjamin Ducke" <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     It all boils down to the same fundamental issue:
>     Google Earth/Maps, etc. _pretend_ that their data
>     is WGS84, but they do not implement the WGS84
>     ellipsoid. So when tools like PROJ attempt to
>     do the _technically correct_ thing and perform
>     a datum transformation WGS84 <-> Web Mercator, then
>     data ends up in the wrong place. If they don't,
>     then people get confused, because the two systems
>     are different. This confusion is now seeping into
>     PROJ and from there into higher-level apps like
>     QGIS. I wish EPSG had never included Web Mercator into
>     its database. Then we could just ignore all of this,
>     use EPSG:4326 and live in blissful ignorance.
>
>     On 05/03/18 11:42, Idan Miara wrote:
>     > Thanks for you reply,
>     > Since the problem exist also in 2.18 I don't think it is related with
>     > PROJ 5.0, Right? 
>     >
>     > On 5 Mar 2018 12:39, "Kristian Evers" <[hidden email]
>     <mailto:[hidden email]>
>     > <mailto:[hidden email] <mailto:[hidden email]>>> wrote:
>     >
>     >     If you are using PROJ 5.0.0 it is likely to be caused by this
>     known
>     >     issue:
>     >
>     >     https://github.com/OSGeo/proj.4/issues/834
>     <https://github.com/OSGeo/proj.4/issues/834>
>     >     <https://github.com/OSGeo/proj.4/issues/834
>     <https://github.com/OSGeo/proj.4/issues/834>>
>     >
>     >     /Kristian
>     >
>     >     -----Oprindelig meddelelse-----
>     >     Fra: Qgis-user [mailto:[hidden email]
>     <mailto:[hidden email]>
>     >     <mailto:[hidden email]
>     <mailto:[hidden email]>>] På vegne af Benjamin Ducke
>     >     Sendt: 5. marts 2018 10:18
>     >     Til: [hidden email]
>     <mailto:[hidden email]> <mailto:[hidden email]
>     <mailto:[hidden email]>>
>     >     Emne: Re: [Qgis-user] Pseudo Mercator(OSM) @ EPSG:4326 bug?
>     >
>     >     Could it be this:
>     >
>     >   
>      http://proj4.org/faq.html#changing-ellipsoid-why-can-t-i-convert-from-wgs84-to-google-earth-virtual-globe-mercator
>     <http://proj4.org/faq.html#changing-ellipsoid-why-can-t-i-convert-from-wgs84-to-google-earth-virtual-globe-mercator>
>     >   
>      <http://proj4.org/faq.html#changing-ellipsoid-why-can-t-i-convert-from-wgs84-to-google-earth-virtual-globe-mercator
>     <http://proj4.org/faq.html#changing-ellipsoid-why-can-t-i-convert-from-wgs84-to-google-earth-virtual-globe-mercator>>
>     >
>     >     ?
>     >
>     >     The further you get from the equator, the more
>     >     obvious the discrepancy on the Y axis.
>     >
>     >     Best,
>     >
>     >     Ben
>     >
>     >     On 05/03/18 09:38, Idan Miara wrote:
>     >     > Hi,
>     >     >
>     >     > I might have found a bug related to transformation of layer CRS
>     >     > from EPSG:3857 (Pseudo Mercator) to EPSG:4325 (WGS84 Geo).
>     >     > I'm attaching a few images to demonstrate the issue. 
>     >     >
>     >     > Steps to reproduce:
>     >     > I've load OSM in QGIS 2.18.16 (or 3.0,same results)
>     >     > via Tile Server (XYZ):
>     >     > https://a.tile.openstreetmap.org/{z}/{x}/{y}.png
>     <https://a.tile.openstreetmap.org/{z}/{x}/{y}.png>
>     >     <https://a.tile.openstreetmap.org/{z}/{x}/{y}.png
>     <https://a.tile.openstreetmap.org/{z}/{x}/{y}.png>>
>     >     >
>     <https://a.tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png
>     <https://a.tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png>
>     >     <https://a.tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png
>     <https://a.tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png>>>
>     >     >
>     >     > Then set the CRS to EPSG:4326 (WGS84 Geo)
>     >     >
>     >     > I've also loaded a global bounds vector layer (EPSG:4326)
>     >     >
>     >     > In scale 1:100,000,000 it seems that the Pseudo Mercator
>     >     transformation
>     >     > to 4326 is flawed, as the OSM and the vectors are not aligned.
>     >     > In scale 1:50,000,000 it seems OK when the extent is the
>     middle of the
>     >     > map, but if I pan to the south/north it seems distorted again.
>     >     >
>     >     > If I set the project CRS to EPSG:3857 (Pseudo Mercator) as
>     the CRS of
>     >     > the OSM tiles, so the vector layer would be transformed
>     instead, then
>     >     > they do align in all scales (picture with the blue vector
>     layer).
>     >     >
>     >     > It doesn't look like a problem of precision of the
>     transformation from
>     >     > 3857 to 4325 because it's way off. 
>     >     > Is that a bug or am I missing something here?
>     >     >
>     >     > Kind regards,
>     >     > Idan.
>     >     >
>     >     >
>     >     >
>     >     > _______________________________________________
>     >     > Qgis-user mailing list
>     >     > [hidden email] <mailto:[hidden email]>
>     <mailto:[hidden email] <mailto:[hidden email]>>
>     >     > List info:
>     https://lists.osgeo.org/mailman/listinfo/qgis-user
>     <https://lists.osgeo.org/mailman/listinfo/qgis-user>
>     >     <https://lists.osgeo.org/mailman/listinfo/qgis-user
>     <https://lists.osgeo.org/mailman/listinfo/qgis-user>>
>     >     > Unsubscribe:
>     https://lists.osgeo.org/mailman/listinfo/qgis-user
>     <https://lists.osgeo.org/mailman/listinfo/qgis-user>
>     >     <https://lists.osgeo.org/mailman/listinfo/qgis-user
>     <https://lists.osgeo.org/mailman/listinfo/qgis-user>>
>     >     >
>     >
>     >
>     >
>     >     --
>     >     Dr. Benjamin Ducke
>     >     Deutsches Archäologisches Institut (DAI)
>     >     Zentrale Berlin, IT-Referat
>     >     * Projekt "Stunde Null" *
>     >     _______________________________________________
>     >     Qgis-user mailing list
>     >     [hidden email] <mailto:[hidden email]>
>     <mailto:[hidden email] <mailto:[hidden email]>>
>     >     List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>     <https://lists.osgeo.org/mailman/listinfo/qgis-user>
>     >     <https://lists.osgeo.org/mailman/listinfo/qgis-user
>     <https://lists.osgeo.org/mailman/listinfo/qgis-user>>
>     >     Unsubscribe:
>     https://lists.osgeo.org/mailman/listinfo/qgis-user
>     <https://lists.osgeo.org/mailman/listinfo/qgis-user>
>     >     <https://lists.osgeo.org/mailman/listinfo/qgis-user
>     <https://lists.osgeo.org/mailman/listinfo/qgis-user>>
>     >     _______________________________________________
>     >     Qgis-user mailing list
>     >     [hidden email] <mailto:[hidden email]>
>     <mailto:[hidden email] <mailto:[hidden email]>>
>     >     List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>     <https://lists.osgeo.org/mailman/listinfo/qgis-user>
>     >     <https://lists.osgeo.org/mailman/listinfo/qgis-user
>     <https://lists.osgeo.org/mailman/listinfo/qgis-user>>
>     >     Unsubscribe:
>     https://lists.osgeo.org/mailman/listinfo/qgis-user
>     <https://lists.osgeo.org/mailman/listinfo/qgis-user>
>     >     <https://lists.osgeo.org/mailman/listinfo/qgis-user
>     <https://lists.osgeo.org/mailman/listinfo/qgis-user>>
>     >
>     >
>     >
>     > _______________________________________________
>     > Qgis-user mailing list
>     > [hidden email] <mailto:[hidden email]>
>     > List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>     <https://lists.osgeo.org/mailman/listinfo/qgis-user>
>     > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>     <https://lists.osgeo.org/mailman/listinfo/qgis-user>
>     >
>
>
>
>     --
>     Dr. Benjamin Ducke
>     Deutsches Archäologisches Institut (DAI)
>     Zentrale Berlin, IT-Referat
>     * Projekt "Stunde Null" *
>     _______________________________________________
>     Qgis-user mailing list
>     [hidden email] <mailto:[hidden email]>
>     List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>     <https://lists.osgeo.org/mailman/listinfo/qgis-user>
>     Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>     <https://lists.osgeo.org/mailman/listinfo/qgis-user>
>
>



--
Dr. Benjamin Ducke
Deutsches Archäologisches Institut (DAI)
Zentrale Berlin, IT-Referat
* Projekt "Stunde Null" *
_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Pseudo Mercator(OSM) @ EPSG:4326 bug?

Idan Miara
In reply to this post by Andre Joost
It does, but the problem is when I set the project CRS to 4326, so the tiles are projected from 3857 to 4326. The vector layer is not projected. 

On 5 Mar 2018 13:23, "Andre Joost" <[hidden email]> wrote:
Am 05.03.18 um 09:38 schrieb Idan Miara:

  Hi,

I might have found a bug related to transformation of layer CRS from EPSG:3857
(Pseudo Mercator) to EPSG:4325 (WGS84 Geo).
I'm attaching a few images to demonstrate the issue.

Steps to reproduce:
I've load OSM in QGIS 2.18.16 (or 3.0,same results)
via Tile Server (XYZ):
https://a.tile.openstreetmap.org/{z}/{x}/{y}.png

Then set the CRS to EPSG:4326 (WGS84 Geo)

I've also loaded a global bounds vector layer (EPSG:4326)


Does the vector layer contain the north or south pole? EPSG:3857 does not like that (it would be in infinity). The same might happen if you request tiles beyond 85°N/S.

HTH,
Andre Joost



_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Pseudo Mercator(OSM) @ EPSG:4326 bug?

Kristian Evers-2
In reply to this post by Benjamin Ducke-4
It would be nice if the Web Mercator was never introduced to the EPSG register,
but nothing we can do about that now. The problem has indeed seeped into
PROJ by mistake (will be fixed with 5.0.1). Unfortunately the internal architecture
in PROJ makes it quite hard to handle both the Web Mercator and treat other
(not so common) transformations with a shift in ellipsoid correctly. Luckily
this is only a problem in the old API. The new API introduced in 5.0.0 is more
flexible and can handle both correctly. It will be a while before that is easily
available for downstream projects such as QGIS.

/Kristian


-----Oprindelig meddelelse-----
Fra: Qgis-user [mailto:[hidden email]] På vegne af Benjamin Ducke
Sendt: 5. marts 2018 11:58
Til: qgis-user <[hidden email]>
Emne: Re: [Qgis-user] Pseudo Mercator(OSM) @ EPSG:4326 bug?

It all boils down to the same fundamental issue:
Google Earth/Maps, etc. _pretend_ that their data
is WGS84, but they do not implement the WGS84
ellipsoid. So when tools like PROJ attempt to
do the _technically correct_ thing and perform
a datum transformation WGS84 <-> Web Mercator, then
data ends up in the wrong place. If they don't,
then people get confused, because the two systems
are different. This confusion is now seeping into
PROJ and from there into higher-level apps like
QGIS. I wish EPSG had never included Web Mercator into
its database. Then we could just ignore all of this,
use EPSG:4326 and live in blissful ignorance.

On 05/03/18 11:42, Idan Miara wrote:

> Thanks for you reply,
> Since the problem exist also in 2.18 I don't think it is related with
> PROJ 5.0, Right? 
>
> On 5 Mar 2018 12:39, "Kristian Evers" <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     If you are using PROJ 5.0.0 it is likely to be caused by this known
>     issue:
>
>     https://github.com/OSGeo/proj.4/issues/834
>     <https://github.com/OSGeo/proj.4/issues/834>
>
>     /Kristian
>
>     -----Oprindelig meddelelse-----
>     Fra: Qgis-user [mailto:[hidden email]
>     <mailto:[hidden email]>] På vegne af Benjamin Ducke
>     Sendt: 5. marts 2018 10:18
>     Til: [hidden email] <mailto:[hidden email]>
>     Emne: Re: [Qgis-user] Pseudo Mercator(OSM) @ EPSG:4326 bug?
>
>     Could it be this:
>
>     http://proj4.org/faq.html#changing-ellipsoid-why-can-t-i-convert-from-wgs84-to-google-earth-virtual-globe-mercator
>     <http://proj4.org/faq.html#changing-ellipsoid-why-can-t-i-convert-from-wgs84-to-google-earth-virtual-globe-mercator>
>
>     ?
>
>     The further you get from the equator, the more
>     obvious the discrepancy on the Y axis.
>
>     Best,
>
>     Ben
>
>     On 05/03/18 09:38, Idan Miara wrote:
>     > Hi,
>     >
>     > I might have found a bug related to transformation of layer CRS
>     > from EPSG:3857 (Pseudo Mercator) to EPSG:4325 (WGS84 Geo).
>     > I'm attaching a few images to demonstrate the issue. 
>     >
>     > Steps to reproduce:
>     > I've load OSM in QGIS 2.18.16 (or 3.0,same results)
>     > via Tile Server (XYZ):
>     > https://a.tile.openstreetmap.org/{z}/{x}/{y}.png
>     <https://a.tile.openstreetmap.org/{z}/{x}/{y}.png>
>     > <https://a.tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png
>     <https://a.tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png>>
>     >
>     > Then set the CRS to EPSG:4326 (WGS84 Geo)
>     >
>     > I've also loaded a global bounds vector layer (EPSG:4326)
>     >
>     > In scale 1:100,000,000 it seems that the Pseudo Mercator
>     transformation
>     > to 4326 is flawed, as the OSM and the vectors are not aligned.
>     > In scale 1:50,000,000 it seems OK when the extent is the middle of the
>     > map, but if I pan to the south/north it seems distorted again.
>     >
>     > If I set the project CRS to EPSG:3857 (Pseudo Mercator) as the CRS of
>     > the OSM tiles, so the vector layer would be transformed instead, then
>     > they do align in all scales (picture with the blue vector layer).
>     >
>     > It doesn't look like a problem of precision of the transformation from
>     > 3857 to 4325 because it's way off. 
>     > Is that a bug or am I missing something here?
>     >
>     > Kind regards,
>     > Idan.
>     >
>     >
>     >
>     > _______________________________________________
>     > Qgis-user mailing list
>     > [hidden email] <mailto:[hidden email]>
>     > List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>     <https://lists.osgeo.org/mailman/listinfo/qgis-user>
>     > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>     <https://lists.osgeo.org/mailman/listinfo/qgis-user>
>     >
>
>
>
>     --
>     Dr. Benjamin Ducke
>     Deutsches Archäologisches Institut (DAI)
>     Zentrale Berlin, IT-Referat
>     * Projekt "Stunde Null" *
>     _______________________________________________
>     Qgis-user mailing list
>     [hidden email] <mailto:[hidden email]>
>     List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>     <https://lists.osgeo.org/mailman/listinfo/qgis-user>
>     Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>     <https://lists.osgeo.org/mailman/listinfo/qgis-user>
>     _______________________________________________
>     Qgis-user mailing list
>     [hidden email] <mailto:[hidden email]>
>     List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>     <https://lists.osgeo.org/mailman/listinfo/qgis-user>
>     Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>     <https://lists.osgeo.org/mailman/listinfo/qgis-user>
>
>
>
> _______________________________________________
> Qgis-user mailing list
> [hidden email]
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>



--
Dr. Benjamin Ducke
Deutsches Archäologisches Institut (DAI)
Zentrale Berlin, IT-Referat
* Projekt "Stunde Null" *
_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Pseudo Mercator(OSM) @ EPSG:4326 bug?

Idan Miara
Ok, Thanks for your detailed explanation! 

On 5 Mar 2018 15:41, "Kristian Evers" <[hidden email]> wrote:
It would be nice if the Web Mercator was never introduced to the EPSG register,
but nothing we can do about that now. The problem has indeed seeped into
PROJ by mistake (will be fixed with 5.0.1). Unfortunately the internal architecture
in PROJ makes it quite hard to handle both the Web Mercator and treat other
(not so common) transformations with a shift in ellipsoid correctly. Luckily
this is only a problem in the old API. The new API introduced in 5.0.0 is more
flexible and can handle both correctly. It will be a while before that is easily
available for downstream projects such as QGIS.

/Kristian


-----Oprindelig meddelelse-----
Fra: Qgis-user [mailto:[hidden email]] På vegne af Benjamin Ducke
Sendt: 5. marts 2018 11:58
Til: qgis-user <[hidden email]>
Emne: Re: [Qgis-user] Pseudo Mercator(OSM) @ EPSG:4326 bug?

It all boils down to the same fundamental issue:
Google Earth/Maps, etc. _pretend_ that their data
is WGS84, but they do not implement the WGS84
ellipsoid. So when tools like PROJ attempt to
do the _technically correct_ thing and perform
a datum transformation WGS84 <-> Web Mercator, then
data ends up in the wrong place. If they don't,
then people get confused, because the two systems
are different. This confusion is now seeping into
PROJ and from there into higher-level apps like
QGIS. I wish EPSG had never included Web Mercator into
its database. Then we could just ignore all of this,
use EPSG:4326 and live in blissful ignorance.

On 05/03/18 11:42, Idan Miara wrote:
> Thanks for you reply,
> Since the problem exist also in 2.18 I don't think it is related with
> PROJ 5.0, Right? 
>
> On 5 Mar 2018 12:39, "Kristian Evers" <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     If you are using PROJ 5.0.0 it is likely to be caused by this known
>     issue:
>
>     https://github.com/OSGeo/proj.4/issues/834
>     <https://github.com/OSGeo/proj.4/issues/834>
>
>     /Kristian
>
>     -----Oprindelig meddelelse-----
>     Fra: Qgis-user [mailto:[hidden email]
>     <mailto:[hidden email]>] På vegne af Benjamin Ducke
>     Sendt: 5. marts 2018 10:18
>     Til: [hidden email] <mailto:[hidden email]>
>     Emne: Re: [Qgis-user] Pseudo Mercator(OSM) @ EPSG:4326 bug?
>
>     Could it be this:
>
>     http://proj4.org/faq.html#changing-ellipsoid-why-can-t-i-convert-from-wgs84-to-google-earth-virtual-globe-mercator
>     <http://proj4.org/faq.html#changing-ellipsoid-why-can-t-i-convert-from-wgs84-to-google-earth-virtual-globe-mercator>
>
>     ?
>
>     The further you get from the equator, the more
>     obvious the discrepancy on the Y axis.
>
>     Best,
>
>     Ben
>
>     On 05/03/18 09:38, Idan Miara wrote:
>     > Hi,
>     >
>     > I might have found a bug related to transformation of layer CRS
>     > from EPSG:3857 (Pseudo Mercator) to EPSG:4325 (WGS84 Geo).
>     > I'm attaching a few images to demonstrate the issue. 
>     >
>     > Steps to reproduce:
>     > I've load OSM in QGIS 2.18.16 (or 3.0,same results)
>     > via Tile Server (XYZ):
>     > <a href="https://a.tile.openstreetmap.org/{z}/{x}/{y}.png" rel="noreferrer" target="_blank">https://a.tile.openstreetmap.org/{z}/{x}/{y}.png
>     <<a href="https://a.tile.openstreetmap.org/{z}/{x}/{y}.png" rel="noreferrer" target="_blank">https://a.tile.openstreetmap.org/{z}/{x}/{y}.png>
>     > <https://a.tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png
>     <https://a.tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png>>
>     >
>     > Then set the CRS to EPSG:4326 (WGS84 Geo)
>     >
>     > I've also loaded a global bounds vector layer (EPSG:4326)
>     >
>     > In scale 1:100,000,000 it seems that the Pseudo Mercator
>     transformation
>     > to 4326 is flawed, as the OSM and the vectors are not aligned.
>     > In scale 1:50,000,000 it seems OK when the extent is the middle of the
>     > map, but if I pan to the south/north it seems distorted again.
>     >
>     > If I set the project CRS to EPSG:3857 (Pseudo Mercator) as the CRS of
>     > the OSM tiles, so the vector layer would be transformed instead, then
>     > they do align in all scales (picture with the blue vector layer).
>     >
>     > It doesn't look like a problem of precision of the transformation from
>     > 3857 to 4325 because it's way off. 
>     > Is that a bug or am I missing something here?
>     >
>     > Kind regards,
>     > Idan.
>     >
>     >
>     >
>     > _______________________________________________
>     > Qgis-user mailing list
>     > [hidden email] <mailto:[hidden email]>
>     > List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>     <https://lists.osgeo.org/mailman/listinfo/qgis-user>
>     > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>     <https://lists.osgeo.org/mailman/listinfo/qgis-user>
>     >
>
>
>
>     --
>     Dr. Benjamin Ducke
>     Deutsches Archäologisches Institut (DAI)
>     Zentrale Berlin, IT-Referat
>     * Projekt "Stunde Null" *
>     _______________________________________________
>     Qgis-user mailing list
>     [hidden email] <mailto:[hidden email]>
>     List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>     <https://lists.osgeo.org/mailman/listinfo/qgis-user>
>     Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>     <https://lists.osgeo.org/mailman/listinfo/qgis-user>
>     _______________________________________________
>     Qgis-user mailing list
>     [hidden email] <mailto:[hidden email]>
>     List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>     <https://lists.osgeo.org/mailman/listinfo/qgis-user>
>     Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>     <https://lists.osgeo.org/mailman/listinfo/qgis-user>
>
>
>
> _______________________________________________
> Qgis-user mailing list
> [hidden email]
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>



--
Dr. Benjamin Ducke
Deutsches Archäologisches Institut (DAI)
Zentrale Berlin, IT-Referat
* Projekt "Stunde Null" *
_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user