# NOT RUN {
library(sf)
sample_flines <- read_sf(system.file("extdata",
"petapsco_flowlines.gpkg",
package = "nhdplusTools"))
plot(sample_flines$geom)
start_COMID <- 11690092
DM_COMIDs <- get_DM(sample_flines, start_COMID)
plot(dplyr::filter(sample_flines, COMID %in% DM_COMIDs)$geom,
col = "red", add = TRUE, lwd = 3)
DM_COMIDs <- get_DM(sample_flines, start_COMID, distance = 40)
plot(dplyr::filter(sample_flines, COMID %in% DM_COMIDs)$geom,
col = "blue", add = TRUE, lwd = 2)
# }
Run the code above in your browser using DataLab