The goal of isoraster is to create contour lines and contour polygons from rasters.
The R terra package is used as a foundation. The R isoband package is the engine, sf is used as an intermediate format internally.
You can install the development version of isoraster like so:
remotes::install_github("mdsumner/isoraster")
This is a basic example.
plot(isoband_terra(rast(volcano)))
plot(isoline_terra(rast(volcano), seq(100, 170, by = 5)))
plot(isoband_terra(rast(volcano), c(100, 110, 120), c(110, 120, 130)))
Note that the lines are nice and smooth, because the underlying algorithm is marching squares in {isoband}, equivalent to R’s ‘contour()’.
Please note that the isoraster project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.