get_focal_distance: Get the network distance between a focal point and other...

View source: R/lake_distance.R

get_focal_distanceR Documentation

Get the network distance between a focal point and other points on a line network

Description

Get the network distance between a focal point and other points on a line network

Usage

get_focal_distance(lines, lakes, outlet, size_threshold = 4)

Arguments

lines

sf lines object

lakes

sf polygon object

outlet

integer row index of outlet reach relative to lines

size_threshold

numeric size above which to consider as a lake

Examples

## Not run: 
library(nhdR)

data(nhd_sub_lines)
data(nhd_sub_lakes)

outlet_reach   <- terminal_reaches(network = nhd_sub_lines,
                                   approve_all_dl = TRUE)
outlet <- which(outlet_reach[['comid']] == nhd_sub_lines[['comid']])

get_focal_distance(nhd_sub_lines, nhd_sub_lakes, outlet = outlet)


## End(Not run)


jsta/streamnet documentation built on July 9, 2022, 9:02 p.m.