man/examples/ex_asContour.r

if (grassStarted()) {

# Setup
library(terra)

# Elevation raster
madElev <- fastData("madElev")

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

# Calculate contour lines:
conts <- as.contour(elev, nlevels = 10)

plot(madElev)
plot(conts, add = TRUE)

}
adamlilith/fasterRaster documentation built on Sept. 23, 2024, 1:28 a.m.