Description Usage Arguments Value Author(s) See Also Examples
View source: R/spec_head_from_slope.R
Calculate specified head elevations given geometry & slope Assumes a single line.
1 | spec_head_from_slope(swdf, sp, slope, initial_elev, order_by_index = F)
|
swdf |
DataFrame/Geometry of node barycentric coordinates as returned by
|
sp |
integer, stress period of heads, used for column naming |
slope |
numeric, slope |
initial_elev |
streambed elevation at start of segment 1 |
swdf DataFrame/Geometry with added seg1.head[sp] and seg1.head[sp] columns
Leland Scantlebury
1 2 3 4 5 6 7 8 9 10 11 | #-- Read in shapefiles
str <- read_sf(system.file("extdata", "MehlandHill2010_stream.shp", package = "pbjr"))
tri <- read_sf(system.file("extdata", "720_triangles.shp", package = "pbjr"))
vor <- read_sf(system.file("extdata", "720_voronoi.shp", package = "pbjr"))
str <- line_explode(str)
#-- Calculate barycentric weight DF
swdf <- calc_stream_voronoi_weights(stream = str, voronoi = vor, triangles = tri)
#-- Calculate distances
swdf <- spec_head_from_slope(swdf = swdf, sp = 1, slope = 0.0015, initial_elev = 50)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.