man/examples/ex_streams.r

if (grassStarted()) {

# Setup
library(terra)

# Example data
madElev <- fastData("madElev")

# Convert a SpatRaster to a GRaster
elev <- fast(madElev)

# Calculate stream channels
streams <- streams(elev)
plot(streams)

}
adamlilith/fasterRaster documentation built on Oct. 26, 2024, 4:06 p.m.