Skip to content

Commit

Permalink
Add code to test #552
Browse files Browse the repository at this point in the history
  • Loading branch information
Robinlovelace committed Nov 2, 2023
1 parent f72e6ae commit 5c156e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions R/linefuns.R
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ line_segment.sf <- function(
# If using rsgeo, we can do the whole thing in one go:
segment_lengths <- as.numeric(sf::st_length(l))
n_segments <- n_segments(segment_lengths, segment_length)
browser()
res <- line_segment_rsgeo(l, n_segments = n_segments)
return(res)
}
Expand Down
5 changes: 4 additions & 1 deletion R/rnet_join.R
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,10 @@ line_cast <- function(x) {
#' # system("gh release download v1.0.2")
#' # rnet_x = sf::read_sf("rnet_x_ed.geojson")
#' # rnet_y = sf::read_sf("rnet_y_ed.geojson")
#' # rnet_merged = rnet_merge(rnet_x, rnet_y, dist = 9, segment_length = 20, funs = funs)
#' # rnet_merged = rnet_merge(rnet_x, rnet_y, dist = 9, segment_length = 15, funs = funs)
#' if (FALSE) {
#'
#' }
#' @return An sf object with the same geometry as `rnet_x`
rnet_merge <- function(rnet_x, rnet_y, dist = 5, funs = NULL, sum_flows = TRUE, crs = geo_select_aeq(rnet_x), ...) {
if (is.null(funs)) {
Expand Down

0 comments on commit 5c156e4

Please sign in to comment.