st_contour {stars} | R Documentation |
Compute contour lines or sets
st_contour(
x,
na.rm = TRUE,
contour_lines = FALSE,
breaks = classInt::classIntervals(na.omit(as.vector(x[[1]])))$brks
)
x |
object of class |
na.rm |
logical; should missing valued cells be removed, or also be converted to features? |
contour_lines |
logical; if |
breaks |
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)