Get upstream distance for sites in an LSN
updist_sites(
sites,
edges,
length_col,
lsn_path,
save_local = TRUE,
overwrite = TRUE
)
A named list of one or more sf
objects with
POINT geometry that have been snapped to the LSN using
sites_to_lsn
.
An sf
object with LINESTING geometry created
using lines_to_lsn
and
link[SSNbler]{updist_edges}
.
The name of the column in edges
that
contains the length of each edge feature.
Local pathname to a directory in
character format specifying where the LSN resides, which is
created using link[SSNbler]{lines_to_lsn}
. Must be
specified if save_local = TRUE
.
Logical indicating whether the updated
sites
should be saved to lsn_path
in geopackage
format. File basenames are taken from the names assigned to the
sites
list. Default is TRUE
.
A logical indicating whether results should be
overwritten if the upDist column already exists in sites
or sites.gpkg already exists in lsn_path
and
save_local = TRUE
. Default = TRUE.
One or more sf
object(s) with all the original
data from sites
, along with a new upDist
column in
each sites sf
object. A named list is returned. If
save_local = TRUE
, a geopackage for each sf
object
is saved in lsn_path
. Output file names are assigned based
on the input sites
attribute names
.