Skip to content

Commit

Permalink
omit get_profiles() from ors_shortest_distances() profile argument
Browse files Browse the repository at this point in the history
  • Loading branch information
JsLth committed Sep 19, 2024
1 parent a34d5c6 commit d3be26c
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions R/pairwise.R
Original file line number Diff line number Diff line change
Expand Up @@ -287,21 +287,19 @@ ors_pairwise_single <- function(index,
ors_shortest_distances <- function(src,
dst,
group = NULL,
profile = get_profiles(),
profile = NULL,
units = c("m", "km", "mi"),
geometry = FALSE,
instance = NULL,
...,
proximity_type = c("duration", "distance"),
progress = TRUE) {
# Validate arguments
instance <- check_instance(instance)
url <- get_ors_url(instance)
assert_that(is_sf(src), is_sf(dst), is_true_or_false(geometry))
units <- match.arg(units)
proximity_type <- match.arg(proximity_type)
profile <- match.arg(profile, several.ok = TRUE)

instance <- check_instance(instance)
url <- get_ors_url(instance)
profile <- profile %||% get_profiles(url = url, force = FALSE)
assert_endpoint_available(url, "routing")

src <- prepare_input(src)
Expand Down

0 comments on commit d3be26c

Please sign in to comment.