View source: R/make_attribute_topology.R
make_attribute_topology | R Documentation |
given a set of lines with starting and ending nodes that form a geometric network, construct an attribute topology.
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)
x |
data.frame network compatible with hydroloom_names. |
min_distance |
numeric distance in units compatible with the units of
the projection of |
If a future
plan is set up, node distance calculations will be
applied using future workers.
data.frame with id and toid
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.