make_attribute_topology {hydroloom} | R Documentation |
Make Attribute Topology
Description
given a set of lines with starting and ending nodes that form a geometric network, construct an attribute topology.
Usage
make_attribute_topology(x, min_distance)
## S3 method for class 'data.frame'
make_attribute_topology(x, min_distance)
## S3 method for class 'hy'
make_attribute_topology(x, min_distance)
Arguments
x |
data.frame network compatible with hydroloom_names. |
min_distance |
numeric distance in units compatible with the units of
the projection of |
Details
If a future
plan is set up, node distance calculations will be
applied using future workers.
Value
data.frame with id and toid
Examples
x <- sf::read_sf(system.file("extdata/new_hope.gpkg", package = "hydroloom"))
y <- dplyr::select(x, COMID)
y <- sf::st_transform(y, 5070)
z <- make_attribute_topology(y, 10)
x <- add_toids(hy(x), return_dendritic = FALSE)
x[x$id == x$id[1],]$toid
z[z$COMID == x$id[1],]$toid
[Package hydroloom version 1.0.2 Index]