I am trying to read several rasters using the terra package; first I get a vector with the file names and then I use the rast()
function to read the files.
Land_variables_files <- list.files("Land_Variables1", pattern = '.tif$', full.names = T)
Land_variables_temp <- rast(Land_variables_files)
They should already be in EPSG 3035 and in fact this is the case, but when I wrote them I get this message on the screen
proj_create_from_database: datum not found
proj_create_from_database: ellipsoid not found
proj_create_from_database: prime meridian not found
I also tried to read them in EPSG 4326, but nothing changed.
What could be the problem An error regarding my reference system or the way I set it? I do my preliminary analyses in QGIS and save the rasters in EPSG 3035.
Using show(Land_Variables_temp)
this is what I get:
class : SpatRaster
dimensions : 1307, 1307, 7 (nrow, ncol, nlyr)
resolution : 100, 100 (x, y)
extent : 4496516, 4627216, 2494261, 2624961 (xmin, xmax, ymin, ymax)
coord. ref. : ETRS89-extended / LAEA Europe (EPSG:3035)
sources : Agricultural_Fields.tif
Coniferous_Forests.tif
Deciduous_Forests.tif
... and 4 more source(s)
names : Agric~ields, Conif~rests, Decid~rests, Global_Model, Pastures, Settlements, ...
min values : ? , ? , ? , 64, ? , ? , ...
max values : ? , ? , ? , 100, ? , ? , ... '
I don't know why some variables have ? as min/max values, but plotting them or taking them individually the values are okay.
on the other hand, using crs()
this is the result:
[1] "PROJCRS[\"ETRS89-extended / LAEA Europe\",\n BASEGEOGCRS[\"ETRS89\",\n ENSEMBLE[\"European Terrestrial Reference System 1989 ensemble\",\n MEMBER[\"European Terrestrial Reference Frame 1989\"],\n MEMBER[\"European Terrestrial Reference Frame 1990\"],\n MEMBER[\"European Terrestrial Reference Frame 1991\"],\n MEMBER[\"European Terrestrial Reference Frame 1992\"],\n MEMBER[\"European Terrestrial Reference Frame 1993\"],\n MEMBER[\"European Terrestrial Reference Frame 1994\"],\n MEMBER[\"European Terrestrial Reference Frame 1996\"],\n MEMBER[\"European Terrestrial Reference Frame 1997\"],\n MEMBER[\"European Terrestrial Reference Frame 2000\"],\n MEMBER[\"European Terrestrial Reference Frame 2005\"],\n MEMBER[\"European Terrestrial Reference Frame 2014\"],\n ELLIPSOID[\"GRS 1980\",6378137,298.257222101,\n LENGTHUNIT[\"metre\",1]],\n ENSEMBLEACCURACY[0.1]],\n PRIMEM[\"Greenwich\",0,\n ANGLEUNIT[\"degree\",0.0174532925199433]],\n ID[\"EPSG\",4258]],\n CONVERSION[\"Europe Equal Area 2001\",\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[\"northing (Y)\",north,\n ORDER[1],\n LENGTHUNIT[\"metre\",1]],\n AXIS[\"easting (X)\",east,\n ORDER[2],\n LENGTHUNIT[\"metre\",1]],\n USAGE[\n SCOPE[\"Statistical analysis.\"],\n AREA[\"Europe - European Union (EU) countries and candidates. Europe - onshore and offshore: Albania; Andorra; Austria; Belgium; Bosnia and Herzegovina; Bulgaria; Croatia; Cyprus; Czechia; Denmark; Estonia; Faroe Islands; Finland; France; Germany; Gibraltar; Greece; Hungary; Iceland; Ireland; Italy; Kosovo; Latvia; Liechtenstein; Lithuania; Luxembourg; Malta; Monaco; Montenegro; Netherlands; North Macedonia; Norway including Svalbard and Jan Mayen; Poland; Portugal including Madeira and Azores; Romania; San Marino; Serbia; Slovakia; Slovenia; Spain including Canary Islands; Sweden; Switzerland; Turkey; United Kingdom (UK) including Channel Islands and Isle of Man; Vatican City State.\"],\n BBOX[24.6,-35.58,84.73,44.83]],\n ID[\"EPSG\",3035]]"
Using gdal(lib = "all")
in return I get this:
gdal proj geos
"3.5.2" "8.2.1" "3.9.3"
Thanks in advance to everyone
It works for me
Perhaps because I have different versions of the GDAL/PROJ libraries? I am using windows in this example.
This problem has been reported before. Sofar, it appears this message is only given with CRSs that use the ETRS datum. It was not resolved, but it does not seem to actually create a problem.