[QGIS-Developer] Discrepancy between GDAL and QGIS in interpreting GeoTIFF SRS definition
Denis Rykov
rykovd at gmail.com
Wed Jul 23 02:56:46 PDT 2025
I have a GeoTIFF file that contains a projected CRS defined as EPSG:3857
via GeoTIFF keys. When I open it using GDAL, the spatial reference is
interpreted as a LOCAL_CS, while QGIS displays it as the EPSG:3857 Web
Mercator projection.
I'm trying to understand the reason behind this discrepancy.
Here is the code I'm using with GDAL:
>>> from osgeo import gdal
>>> ds = gdal.OpenEx("test.tif")
>>> dsproj = ds.GetProjection()
Warning 1: The definition of projected CRS EPSG:3857 got from GeoTIFF keys
is not the same as the one from the EPSG registry, which may cause issues
during reprojection operations. Set GTIFF_SRS_SOURCE configuration option
to EPSG to use official parameters (overriding the ones from GeoTIFF keys),
or to GEOKEYS to use custom values from GeoTIFF keys and drop the EPSG code.
>>> dsproj
'LOCAL_CS["WGS 84 /
Pseudo-Mercator",UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","3857"]]'
Why does QGIS appear to resolve this as EPSG:3857, while GDAL gives a
LOCAL_CS definition?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20250723/7ca2dfef/attachment.htm>
More information about the QGIS-Developer
mailing list