library(terra)
data(nlmodis20110712)
data(NLpol)
nlmodis20110712 <- terra::rast(nlmodis20110712)
# SpaVector
NLpol = vect(NLpol)
crs(NLpol) <- "epsg:4326"
# # sf
# NLpol <- st_as_sf(NLpol) #, crs = st_crs(4326))
# plot(nlmodis20110712)
# fill spatial gaps
r=rfillspgaps(nlmodis20110712,NLpol)
# plot(r)
Run the code above in your browser using DataLab