Hello everyone
I have tried to load image.SR for Landsat 8 on data in 2022, this issue is the first time has happened to me. For data in 2021 it did not happen when loading image.SR.
image.SR <- loadImageSR(path=raw_data_folder, aoi=aoi)
Error in .local(.Object, ...) :
Error in .rasterObjectFromFile(x, band = band, objecttype = "RasterLayer", :
Cannot create a RasterLayer object from this file. (file does not exist)
I have tried to solve this issue by using the code below
files <- list.files(path = raw_data_folder
-
, pattern = "_sr_band+[2-7].tif$", full.names = T)
files <- list.files(path = raw_data_folder
- , pattern = "_SR_B+[2-7].tif$", full.names = T)
files <- list.files(path = system.file("March1422", package="water")
-
, pattern = "_SR_B+[2-7].(TIF|tif)$", full.names = T)
stack1 <- list()
for(i in 1:6){
-
stack1[i] <- raster(files[i])}
Warning messages:
1: In [<-
(*tmp*
, i, value = raster(files[i])) :
implicit list embedding of S4 objects is deprecated
2: In [<-
(*tmp*
, i, value = raster(files[i])) :
implicit list embedding of S4 objects is deprecated
3: In [<-
(*tmp*
, i, value = raster(files[i])) :
implicit list embedding of S4 objects is deprecated
4: In [<-
(*tmp*
, i, value = raster(files[i])) :
implicit list embedding of S4 objects is deprecated
5: In [<-
(*tmp*
, i, value = raster(files[i])) :
implicit list embedding of S4 objects is deprecated
6: In [<-
(*tmp*
, i, value = raster(files[i])) :
implicit list embedding of S4 objects is deprecated
image.SR <- do.call(stack, stack1)
image.SR <- crop(image.SR, aoi)
image.SR <- image.SR / 10000
bandnames <- c("B", "G", "R", "NIR", "SWIR1", "SWIR2")
image.SR <- saveLoadClean(imagestack = image.SR,
Error in saveLoadClean(imagestack = image.SR, stack.names = bandnames, :
could not find function "saveLoadClean"
When i tried to run METRIC.EB, the new issue is happened
Energy.Balance <- METRIC.EB(image.DN = image, image.SR = image.SR,
-
plain=TRUE, aoi=aoi, n = 5, WeatherStation = WeatherStation,
-
ETp.coef = 1.2, sat="L8", alb.coeff = "Olmedo", LST.method = "SW",
-
LAI.method = "metric2010", Z.om.ws = 0.03, MTL = MTLfile)
Error in calcAnchors(image = image.TOAr, Ts = Ts, LAI = LAI, plots = T, :
Not enough pixels with the conditions for anchor pixels. I
found 0 cold pixels and 0 hot pixels.
In addition: Warning messages:
1: In calcAnchors(image = image.TOAr, Ts = Ts, LAI = LAI, plots = T, :
anchor method names has changed. Old names (CITRA-MCBx) are
deprecated. Options now include 'best', 'random' and 'flexible'
2: In max(Ts[albedo >= 0.13 & albedo <= 0.15 & NDVI >= 0.1 & NDVI <= :
no non-missing arguments to max; returning -Inf
Can you help me, please?
thank you for your understanding and cooperation
Best regards,