I'm trying to calculate sdq using a moving window with texture_image() and it's returning a raster containing all zeros. I thought it may be something idiosyncratic to my dataset but it also seems to be doing it with the normforest data. See example. Other metrics seem to work. Any ideas?
I'm trying to calculate sdq using a moving window with texture_image() and it's returning a raster containing all zeros. I thought it may be something idiosyncratic to my dataset but it also seems to be doing it with the normforest data. See example. Other metrics seem to work. Any ideas?
`# import raster image data(normforest) normforest <- terra::unwrap(normforest)
crop raster to smaller area
x <- terra::crop(normforest, terra::ext(normforest[1:100, 1:100, drop = FALSE]))
Calculate sdq
sdq_img <- texture_image(x = x, window = 'square', size = 5, metric = 'sdq', parallel = TRUE, ncores = 1, nclumps = 20) sdq_img
plot the result
terra::plot(sdq_img)`