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?
_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer