Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Robinlovelace committed May 1, 2024
1 parent 1221459 commit 311ad86
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 10 deletions.
15 changes: 10 additions & 5 deletions R/linefuns.R
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,14 @@ line_midpoint <- function(l, tolerance = NULL) {
#'
#' This function keeps the attributes.
#' Note: results differ when `use_rsgeo` is `TRUE`:
#' the `{rsgeo}` implementation is faster and more reliably
#' keeps returned linestrings below a the `segment_length` value,
#' but does not always return the number of segments requested.
#' the `{rsgeo}` implementation will be faster.
#' Results may not always keep returned linestrings below
#' the `segment_length` value.
#' The `{rsgeo}` implementation does not always
#' return the number of segments requested due to an upstream issue in the
#' `geo` Rust crate.
#'
#' Note: we recommend running these functions on projected data.
#'
#' @inheritParams line2df
#' @param segment_length The approximate length of segments in the output (overrides n_segments if set)
Expand Down Expand Up @@ -386,8 +391,8 @@ line_segment_rsgeo <- function(l, n_segments) {

# sf linestring:
res_sfc_ml = sf::st_as_sfc(res_rsgeo)
n_segments_rsgeo = as.numeric(lengths(res_sfc_ml))
if (! identical(n_segments, n_segments_rsgeo)) {
n_segments_rsgeo = lengths(res_sfc_ml)
if (! all(n_segments == n_segments_rsgeo)) {
sum_segments <- sum(n_segments)
sum_segments_rsgeo <- sum(n_segments_rsgeo)
msg = paste0(
Expand Down
2 changes: 1 addition & 1 deletion R/stplanr-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#'
#' @name stplanr-package
#' @aliases stplanr stplanr-package
#' @docType package
#' @docType _PACKAGE
#' @author Robin Lovelace \email{rob00x@@gmail.com}
#' @keywords package
#' @seealso <https://github.com/ropensci/stplanr>
Expand Down
12 changes: 9 additions & 3 deletions man/line_segment.Rd

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

2 changes: 1 addition & 1 deletion man/stplanr-package.Rd

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

0 comments on commit 311ad86

Please sign in to comment.