Description Usage Arguments Value Examples
This is a wrapper around raster::clump
, to apply the function on stars
objects without needing to convert to and from a Raster*
object. (The function uses the gaps=FALSE
setting.)
1 | raster_clump(x)
|
x |
A |
A stars
object with the unique IDs for patches of connected cells that are not 0
or NA
1 2 3 4 5 6 7 | library(stars)
tif = system.file("tif/L7_ETMs.tif", package = "stars")
r = read_stars(tif)
r = r > 100
r_clump = raster_clump(r)
plot(r)
plot(r_clump)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.