Description Usage Arguments Value Author(s) See Also Examples
View source: R/calc_stream_drn.R
Intended to provide a MODFLOW-USG Drain package that can be compared to the results of the PBJ package, given the same grid and stream.
1 2 3 4 5 6 7 8 9 10 | calc_stream_drn(
stream,
voronoi,
str_id_col = "ID.1",
vor_id_col = "ID",
method = "node",
correct_seg_order = T,
seg_min_length = 1e-07,
keep_stream_cols = NULL
)
|
stream |
sf polyline, "exploded" into segments (see |
voronoi |
sf polygon of voronoi tesselation (unstructured model grid). Shapefile ID field will be used to determine node ID. |
method |
character, method to select drain nodes. Only overlap with [voronoi] nodes is currently supported (optional, default: 'node') |
seg_min_length |
numeric, minimum length of segment to include in calculation (default 1e-7). Generally just to weed out numerical errors. |
SF Object/DataFrame of nodes that can be used to gener
Leland Scantlebury
1 2 3 4 5 6 7 8 9 10 | #-- Read in shapefiles
stream <- read_sf(system.file("extdata", "straight_river.shp", package = "pbjr"))
tri <- read_sf(system.file("extdata", "straight_triangles.shp", package = "pbjr"))
vor <- read_sf(system.file("extdata", "straight_voronoi.shp", package = "pbjr"))
#-- Explode polyline
stream <- line_explode(stream)
#-- Create DRNDF
drndf <- calc_stream_drn(stream = stream, voronoi = vor)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.