Is it possible to update (or translate) genSmoothingIMA function for SpatRaster object of terra?
Dear All, Recently, I downloaded a large LST data from AppEEARS with NetCDF4 format (projection “PROJ.4:+proj=longlat +datum=WGS84 +no_defs “ is selected) for gap filling. When the large NetCDF4 file is loaded by raster::brick in R, An error occurred as “Error in CRS(x) : NA”. The NetCDF4 file can be loaded by terra::rast without error. However, genSmoothingIMA function requires RasterBrick object. So, is it possible to update (or translate) genSmoothingIMA function for SpatRaster object of terra?
Dear @ryusupjan, You can smoothin images with IMA with spatRaster in our new package rsat (https://github.com/spatialstatisticsupna/rsat). Here you have the example: require(terra)
load an example of NDVI time series in Navarre
ex.ndvi.navarre <- rast(ex.ndvi.navarre)
the raster stack with the date in julian format as name
plot(ex.ndvi.navarre)
smoothin and fill all the time series
tiles.mod.ndvi.filled <- rsat_smoothing_images(ex.ndvi.navarre, method = "IMA" )
show the filled images
plot(tiles.mod.ndvi.filled)
plot comparison of the cloud and the filled images
tiles.mod.ndvi.comp <- c( ex.ndvi.navarre[[1]], tiles.mod.ndvi.filled[[1]], ex.ndvi.navarre[[2]], tiles.mod.ndvi.filled[[2]] ) plot(tiles.mod.ndvi.comp)