powered by
traverse hydrological network
traverse_flowlines(max_distance, start, direction = c("out", "in"), dataset = c("nhdh", "nhdplusv2"), max_steps = 10000, db_path = NULL, ...)
maximum distance to traverse in km. If negative, traverse until the ocean (node 0) or max_steps is reached.
character node to start
character; either "out" or "in"
which network dataset to traverse. May be either NHD high-res or NHD Plus v2.
maximum traversal steps before terminating
manually specify path to flowtable database. Useful for avoiding database locks when running traversals in parallel.
options passed on to check_dl_file
dataframe of nodes traversed, distance from the start node to each node, and the children of each node.
# NOT RUN { traverse_flowlines(1000, "141329377", "out", "nhdh") # this example traverses until a cycle is found and the end of the network is reached. # }
Run the code above in your browser using DataLab