rsat icon indicating copy to clipboard operation
rsat copied to clipboard

Inherited method error for rsat_smoothing_images

Open Bartesto opened this issue 3 years ago • 2 comments

Hi,

I'm getting the following error when trying to run rsat_smoothing_images() in the last vignette.

Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘rsat_smoothing_images’ for signature ‘"RasterBrick", "character"’

Cheers Bart

Bartesto avatar Dec 09 '21 02:12 Bartesto

Dear @Bartesto , the rsat_smoothing_images function only accepts rtoi (from rsat) or SpatRaster (from terra) objects. If you are using a RasterBrick you can simply induce the data using rast(your_RasterBrick). Try it and let me know. Regards, Unai

unai-perez avatar Dec 13 '21 08:12 unai-perez

Hi @unai-perez, Interesting. I was following the vignette (not using my own data) when this occurred but it appears fine now so all good :)

On another note I notice that tm_shape(c(before,after)) + tm_raster(title = "NDVI", style = "cont") from the ropensci documentation doesn't actually show the before and after scenes. Plotted separately they are fine and demonstrate the fill.

In the actual package vignette documentation this line is different tm_shape(stack(before,after)) + tm_raster(title = "NDVI", style = "cont") which doesn't work at all.

The package is great, thanks for all the hard work! Bart

Bartesto avatar Dec 14 '21 00:12 Bartesto