Compute contour lines or sets
st_contour(
x,
na.rm = TRUE,
contour_lines = FALSE,
breaks = classInt::classIntervals(na.omit(as.vector(x[[1]])))$brks
)
object of class stars
logical; should missing valued cells be removed, or also be converted to features?
logical; if FALSE
, polygons are returned (contour sets), otherwise contour lines
numerical; values at which to "draw" contour levels
this function requires GDAL >= 2.4.0
for polygonizing rasters following grid boundaries, see st_as_sf with arguments as_points=FALSE
and merge=TRUE
; contour plots contour lines using R's native algorithm (which also plots contour levels)