Skip to content

Commit

Permalink
Debugging #514
Browse files Browse the repository at this point in the history
  • Loading branch information
Robinlovelace committed Aug 15, 2023
1 parent a52aab5 commit 0c01642
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions R/linefuns.R
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,14 @@ line_midpoint <- function(l, tolerance = NULL) {
#' @examples
#' l <- routes_fast_sf[2, ]
#' l_seg2 <- line_segment(l = l, n_segments = 2)
#' l_seg3 <- line_segment(l = l, n_segments = 3)
#' l_seg_100 <- line_segment(l = l, segment_length = 100)
#' plot(sf::st_geometry(l_seg2), col = 1:2, lwd = 5)
#' plot(sf::st_geometry(l_seg3), col = 1:3, lwd = 5)
#' plot(sf::st_geometry(l_seg3), col = 1:3)
line_segment <- function(l, n_segments, segment_length = NA) {
if (!is.na(segment_length)) {
browser()
l_length <- sf::st_length(l)
n_segments <- round(l_length / segment_length)
}
Expand Down

0 comments on commit 0c01642

Please sign in to comment.