Skip to content

Error in Monitoring Forest Change using STEF #1

@mikemost

Description

@mikemost

When I try to run the script Monitoring Forest Changes using STEF using the dataset that you have provided, I get the following error after I run the following code chunk:

{r}
Do the monitoring

rad <- rasterEngine(inraster=re_testx, fun=stef_monitor,window_dims=c(windowwidth=9,windowwidth =9),
args=list(mYear = 2016,density = F,my_dates =my_dates,threshold = 0.05,spatiaNormPercentile =95, 
windowwidth=9,tryCatchError=T,sPatioNormalixse =F))

I get the error:

Error in focal_hpc_focalChunkFunction(chunk, chunkArgs) : 
task 1 failed - "the condition has length > 1"
6. stop(simpleError(msg, call = expr)) 
5. e$fun(obj, substitute(ex), parent.frame(), e$data) 
4. foreach(chunk = chunkList, .packages = c("rgdal", "raster", "spatial.tools", 
"mmap", .packages), .verbose = verbose) %dopar% focal_hpc_focalChunkFunction(chunk, 
chunkArgs)
3. focal_hpc_focal_processing(tr, texture_tr, chunkArgs) 
2. focal_hpc(x, fun = focal_hpc_multiRaster_function, args = c(list(fun = fun, 
debugmode = debugmode), args), window_dims = window_dims, 
window_center = window_center, filename = filename, overwrite = overwrite, 
outformat = outformat, additional_header = additional_header, ...
1. rasterEngine(inraster = re_testx, fun = stef_monitor, window_dims = c(windowwidth = 9, 
windowwidth = 9), args = list(mYear = 2016, density = F, 
my_dates = my_dates, threshold = 0.05, spatiaNormPercentile = 95, 
windowwidth = 9, tryCatchError = T, sPatioNormalixse = F))

I would appreciate if you could help me out where the error is coming from.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions