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)

Arguments

r

input raster as terra::rast

aoi

area of interest as simple features sf::sf

n_brks

number of breaks

Value

contour polygon simple features (sf::sf)