Generate a line segment from bank to bank
xt_span_banks.Rd
Given a point within a channel, generate a line segment that goes from bank to bank, for a specified angle.
Examples
# Pick a point in the channel, and an angle
library(sf)
#> Linking to GEOS 3.10.2, GDAL 3.4.1, PROJ 8.2.1; sf_use_s2() is TRUE
pt <- st_centroid(demo_bankline) - c(0, 30)
plot(demo_bankline)
plot(pt, add = TRUE)
## 45 degrees:
span <- xt_span_banks(pt, angle = pi / 4, bankline = demo_bankline)
plot(span, add = TRUE, col = "blue")
## 0 degrees:
span <- xt_span_banks(pt, angle = 0, bankline = demo_bankline)
plot(span, add = TRUE, col = "blue")