Takes a newly drawn flowline and uses the dem to ensure the flowline is digitized in the upstream direction.

flowline(flowline, reach_name, dem)

Arguments

flowline

sf object; A newly digitized flowline.

reach_name

character; The name of the stream reach.

dem

terra SpatRast object; A DEM for the stream reach.

Value

a valid flowline sf object