qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.52k stars 2.99k forks source link

Raster visually displaced depending on scale and viewport #51727

Closed dholstius closed 1 year ago

dholstius commented 1 year ago

What is the bug or the crash?

This may be an upstream (PROJ/GDAL) issue but I can't tell. The viewport matters so I suspect it's at least partly related to QGIS?

Here's a baseline. This rendering is actually incorrect; the raster should fit exactly inside the red polygon.

image

Same thing, but zoomed in. Note that the raster is shifting relative to the red polygon. (The red polygon is itself well-behaved.)

image

Keeping the same zoom level, but panning the viewport. The raster is again displaced.

image

Steps to reproduce the issue

Archive.zip contains:

The SRS of the raster is unusual. It's a custom LCC projection used by some atmospheric modelers in the SF Bay Area.

PROJCRS["unknown",
    BASEGEOGCRS["unknown",
        DATUM["unknown",
            ELLIPSOID["unknown",6370000,0,
                LENGTHUNIT["metre",1,
                    ID["EPSG",9001]]]],
        PRIMEM["Greenwich",0,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8901]]],
    CONVERSION["unknown",
        METHOD["Lambert Conic Conformal (2SP)",
            ID["EPSG",9802]],
        PARAMETER["Latitude of false origin",37,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8821]],
        PARAMETER["Longitude of false origin",-120.5,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8822]],
        PARAMETER["Latitude of 1st standard parallel",60,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8823]],
        PARAMETER["Latitude of 2nd standard parallel",30,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8824]],
        PARAMETER["Easting at false origin",220,
            LENGTHUNIT["kilometre",1000],
            ID["EPSG",8826]],
        PARAMETER["Northing at false origin",16,
            LENGTHUNIT["kilometre",1000],
            ID["EPSG",8827]]],
    CS[Cartesian,2],
        AXIS["(E)",east,
            ORDER[1],
            LENGTHUNIT["kilometre",1000,
                ID["EPSG",9036]]],
        AXIS["(N)",north,
            ORDER[2],
            LENGTHUNIT["kilometre",1000,
                ID["EPSG",9036]]]]

Versions

QGIS version 3.22.3-Białowieża QGIS code revision 1628765ec7
Qt version 5.15.2
Python version 3.9.5
GDAL/OGR version 3.3.2
PROJ version 8.1.1
EPSG Registry database version v10.028 (2021-07-07)
GEOS version 3.9.1-CAPI-1.14.2
SQLite version 3.35.2
PDAL version 2.3.0
PostgreSQL client version 12.3
SpatiaLite version 5.0.1
QWT version 6.1.6
QScintilla2 version 2.11.5
OS version macOS 13.1
       

Active Python plugins Socrata | 2.2 qgis-maptiler-plugin | 2.0.0 lockzoom | 3.0.3 qtiles | 1.7.1 processing | 2.12.99 sagaprovider | 2.12.99 grassprovider | 2.12.99 db_manager | 0.1.20 MetaSearch | 0.3.5

QGIS version 3.22.3-Białowieża QGIS code revision 1628765ec7 Qt version 5.15.2 Python version 3.9.5 GDAL/OGR version 3.3.2 PROJ version 8.1.1 EPSG Registry database version v10.028 (2021-07-07) GEOS version 3.9.1-CAPI-1.14.2 SQLite version 3.35.2 PDAL version 2.3.0 PostgreSQL client version 12.3 SpatiaLite version 5.0.1 QWT version 6.1.6 QScintilla2 version 2.11.5 OS version macOS 13.1

Active Python plugins Socrata 2.2 qgis-maptiler-plugin 2.0.0 lockzoom 3.0.3 qtiles 1.7.1 processing 2.12.99 sagaprovider 2.12.99 grassprovider 2.12.99 db_manager 0.1.20 MetaSearch 0.3.5

Supported QGIS version

New profile

Additional context

No response

agiudiceandrea commented 1 year ago

@dholstius, the issue doesn't occur on my Windows system using the currently supported QGIS 3.22.15 and QGIS 3.28.3 versions. Could you please try if the issue does occur on your macOS system actually using the currently supported versions and using a new QGIS user profile?

dholstius commented 1 year ago

Thanks @agiudiceandrea! Updated to 3.28.3 and it is no longer a problem. Closing.