Skip to content

Commit

Permalink
Add example showing line_bearing works for routes
Browse files Browse the repository at this point in the history
  • Loading branch information
Robinlovelace committed Oct 5, 2023
1 parent 6622d72 commit dee8b5b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
5 changes: 4 additions & 1 deletion R/linefuns.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ is_linepoint <- function(l) {
#' l <- flowlines_sf[1:5, ]
#' bearings_sf_1_9 <- line_bearing(l)
#' bearings_sf_1_9 # lines of 0 length have NaN bearing
#' line_bearing(l, bidirectional = TRUE)
#' b <- line_bearing(l, bidirectional = TRUE)
#' r <- routes_fast_sf[1:5, ]
#' b2 <- line_bearing(r, bidirectional = TRUE)
#' plot(b, b2)
line_bearing <- function(l, bidirectional = FALSE) {
# Convert to lon/lat data if not already
is_longlat <- sf::st_is_longlat(l)
Expand Down
5 changes: 4 additions & 1 deletion man/line_bearing.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions man/rnet_merge.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit dee8b5b

Please sign in to comment.