Get the "centerline" of the longest river along the DEM
get_river_centerline.RdGet the "centerline" of the longest river along the DEM
Arguments
- dem
Either a SpatRaster (created via
terra::rast()) or an object thatterra::rast()can read to create a SpatRaster.- quiet
Boolean: should execution proceed "quietly", without messages (
TRUE) or should progress updates be posted during centerline download and interpolation (FALSE)?
Value
An sfc object (as created by sf::st_sfc()), with LINESTRING
geometry, representing the center of the river within the DEM area.
Examples
if (FALSE) { # rlang::is_interactive()
dem <- system.file("elevation.tiff", package = "rrrem")
centerline <- get_river_centerline(dem)
}