Contour the input raster (using stars::st_contour
). Use "pretty" breaks
(using classInt::classIntervals()
). Clip by area of interest.
rast_to_contours(r, aoi, n_brks = 8)
input raster as terra::rast
area of interest as simple features sf::sf
number of breaks
contour polygon simple features (sf::sf
)