You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
Just started looking into geodiv for my research. When I tried to run the example code for texture_image(), I get a raster filled with Inf. This also occurs when I apply the function to my own data.
Example:
> help(texture_image)
>
> # 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]))
>
> # get a surface of root mean square roughness
> sa_img <- texture_image(x = x, window = 'square',
+ size = 5, metric = 'sa',
+ parallel = TRUE, ncores = 1, nclumps = 20)
[1] "Beginning calculation of metrics over windows..."
Total time to calculate metrics: 1.361829
>
> # plot the result
> terra::plot(sa_img)
> sa_img
class : SpatRaster
dimensions : 100, 100, 1 (nrow, ncol, nlyr)
resolution : 0.0002694946, 0.0002694946 (x, y)
extent : -123, -122.9731, 43.07305, 43.1 (xmin, xmax, ymin, ymax)
coord. ref. : lon/lat WGS 84
source(s) : memory
name : summer_ndvi_p45_r30_2000_2016_30m
min value : 1.797693e+308
max value : Inf
>
Thanks!
The text was updated successfully, but these errors were encountered:
Hello,
Just started looking into
geodiv
for my research. When I tried to run the example code fortexture_image()
, I get a raster filled withInf
. This also occurs when I apply the function to my own data.Example:
Thanks!
The text was updated successfully, but these errors were encountered: