session_grid(NULL)
a <- ursa_dummy(mul=1/16)
a <- a[a>100]
print(a)
print(band_mean(a))
b2 <- polygonize(a,engine=ifelse(requireNamespace("sp"),"sp","sf"))
print(class(b2))
print(colMeans(spatial_data(b2),na.rm=TRUE))
str(e1 <- spatial_bbox(a))
str(e2 <- spatial_bbox(b2))
print(as.numeric(e1))
print(as.numeric(e2))
Run the code above in your browser using DataLab