I receive the following warning while reading Corine land cover data in tif format either using raster or terra package.
R <- raster::raster(CLC_Tiff)
Warning message: In new_CppObject_xp(fields$.module, fields$.pointer, ...) : GDAL Message 1: The definition of projected CRS EPSG:3035 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.
Here is the projection
raster::projection(R)
[1] "+proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 +ellps=GRS80 +units=m +no_defs"
Similarly for terra:
R <- terra::rast(CLC_Tiff, crs = "EPSG:3035")
Warning message:
In new_CppObject_xp(fields$.module, fields$.pointer, ...) :
GDAL Message 1: The definition of projected CRS EPSG:3035 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.
terra::crs(R)
[1] "PROJCRS[\"ETRS89-extended / LAEA Europe\",\n BASEGEOGCRS[\"ETRS89\",\n DATUM[\"European Terrestrial Reference System 1989\",\n ELLIPSOID[\"GRS 1980\",6378137,298.257222101004,\n LENGTHUNIT[\"metre\",1]]],\n PRIMEM[\"Greenwich\",0,\n ANGLEUNIT[\"degree\",0.0174532925199433]],\n ID[\"EPSG\",4258]],\n CONVERSION[\"Lambert Azimuthal Equal Area\",\n METHOD[\"Lambert Azimuthal Equal Area\",\n ID[\"EPSG\",9820]],\n PARAMETER[\"Latitude of natural origin\",52,\n ANGLEUNIT[\"degree\",0.0174532925199433],\n ID[\"EPSG\",8801]],\n PARAMETER[\"Longitude of natural origin\",10,\n ANGLEUNIT[\"degree\",0.0174532925199433],\n ID[\"EPSG\",8802]],\n PARAMETER[\"False easting\",4321000,\n LENGTHUNIT[\"metre\",1],\n ID[\"EPSG\",8806]],\n PARAMETER[\"False northing\",3210000,\n LENGTHUNIT[\"metre\",1],\n ID[\"EPSG\",8807]]],\n CS[Cartesian,2],\n AXIS[\"(E)\",east,\n ORDER[1],\n LENGTHUNIT[\"metre\",1]],\n AXIS[\"(N)\",north,\n ORDER[2],\n LENGTHUNIT[\"metre\",1]],\n ID[\"EPSG\",3035]]"
I can in principle use suppressWarnings() around the function to avoid this warning.
However, I'd like to 1) know the reason for this; 2) is there a way to avoid this; and 3) is it something I should care about for subsequent analyses using terra/raster/sf packages?
The problem is that the file has a CRS that contains an EPSG code and a bunch of parameters. These parameters do not match the parameters for the same EPSG code in the database that GDAL uses.
Here is a comparison showing that they are quite different in terms of the characters used.
But in itself, that does not mean that the CRS is meaningfully different.
I do not see any difference if I do: