[Qgis-user] Pseudo Mercator(OSM) @ EPSG:4326 bug?

Benjamin Ducke benducke at fastmail.fm
Mon Mar 5 03:14:39 PST 2018


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" <benducke at fastmail.fm
> <mailto:benducke at fastmail.fm>> 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" <kreve at sdfe.dk
>     <mailto:kreve at sdfe.dk>
>     > <mailto:kreve at sdfe.dk <mailto:kreve at sdfe.dk>>> 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:qgis-user-bounces at lists.osgeo.org
>     <mailto:qgis-user-bounces at lists.osgeo.org>
>     >     <mailto:qgis-user-bounces at lists.osgeo.org
>     <mailto:qgis-user-bounces at lists.osgeo.org>>] På vegne af Benjamin Ducke
>     >     Sendt: 5. marts 2018 10:18
>     >     Til: qgis-user at lists.osgeo.org
>     <mailto:qgis-user at lists.osgeo.org> <mailto:qgis-user at lists.osgeo.org
>     <mailto:qgis-user at lists.osgeo.org>>
>     >     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
>     >     > Qgis-user at lists.osgeo.org <mailto:Qgis-user at lists.osgeo.org>
>     <mailto:Qgis-user at lists.osgeo.org <mailto:Qgis-user at lists.osgeo.org>>
>     >     > 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
>     >     Qgis-user at lists.osgeo.org <mailto:Qgis-user at lists.osgeo.org>
>     <mailto:Qgis-user at lists.osgeo.org <mailto:Qgis-user at lists.osgeo.org>>
>     >     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
>     >     Qgis-user at lists.osgeo.org <mailto:Qgis-user at lists.osgeo.org>
>     <mailto:Qgis-user at lists.osgeo.org <mailto:Qgis-user at lists.osgeo.org>>
>     >     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
>     > Qgis-user at lists.osgeo.org <mailto:Qgis-user at lists.osgeo.org>
>     > 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
>     Qgis-user at lists.osgeo.org <mailto:Qgis-user at lists.osgeo.org>
>     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" *



More information about the Qgis-user mailing list