Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in Monitoring Forest Change using STEF #1

Open
mikemost opened this issue Jun 7, 2022 · 0 comments
Open

Error in Monitoring Forest Change using STEF #1

mikemost opened this issue Jun 7, 2022 · 0 comments

Comments

@mikemost
Copy link

mikemost commented Jun 7, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant