Closed jofeggg closed 4 months ago
It was a problem with one of my traits that was taking values of 0 in all pixels when converting the raster to integer BIL without using the multiplying factor.
The function runs perfectly.
Sorry for the inconvenience.
Kind regards,
ok, thank you for updating this issue! I will now close it. Best regards, jb
Hello,
I'm using the function map_functional_div to compute functional richness using a raster stack of 4 bands corresponding to functional traits (LAI, Cab...)
My tiff file was converted to ENVI BIL following the function:
raster2BIL( Raster_Path="H:/raster/trait_stack.tif", Sensor = "unknown", Output_Dir = FALSE, Convert_Integer = TRUE, Multiplying_Factor = 1, Multiplying_Factor_Last = 1, Mask = FALSE )
Then I run the functions:
Datadir <- "H:/raster" NameRaster <- 'trait_stack_bil' Input_Image_File <- file.path(Datadir,NameRaster) Output_Dir <- "H:/raster/funcdiv" TypePCA <- "SPCA" window_size <- 3
map_functional_div( Original_Image_File = Input_Image_File, Functional_File = FALSE, Selected_Features = FALSE, Output_Dir = Output_Dir, window_size, nbCPU = 8, MaxRAM = 0.5, FDmetric = c("FRic") )
And I get the error:
[1] "Compute functional metrics" compute Functional diversity in 8 chunks
Progress interrupted by subscriptOutOfBoundsError condition: subscript out of bounds Error in alphaSSD[[i]] : subscript out of bounds
Can you help me?
Thanks in advance.
Kind regards,