View source: R/nsink_generate_flowpath.R
nsink_generate_flowpath | R Documentation |
This function takes an XY location as a starting point and generates a flowpath for use in the N-Sink nitrogen removal analysis. The flowpath is a combination of a flow direction derived flowpath on land plus NHDPlus derived stream-reach flowpath.
nsink_generate_flowpath(starting_location, input_data)
starting_location |
An |
input_data |
A list of input data with (at least) "fdr", "streams",
"tot", and "raster_template". These may be generated with
|
An sf
LINESTRING object of the flowpath that starts at
the starting_location
and ends at the ouflow of the HUC.
## Not run:
library(nsink)
niantic_huc <- nsink_get_huc_id("Niantic River")$huc_12
niantic_data <- nsink_get_data(niantic_huc, data_dir = "nsink_data")
aea <- 5072
niantic_nsink_data <- nsink_prep_data(niantic_huc, projection = aea,
data_dir = "nsink_niantic_data")
pt <- c(1948121, 2295822)
start_loc <- st_sf(st_sfc(st_point(c(pt)), crs = aea))
fp <- nsink_generate_flowpath(start_loc, niantic_nsink_data)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.