Creates sf of geometry type point for each source feature with the minimum distance and duration values to n nearest target features.

create_time_distance_n_sf(odm_object, n)

Arguments

odm_object

of type list encompassing a duration and a distance matrix, the source and target locations. Created by using either calc_odm or calc_odm_multicore

n

An integer defining the number of minimum values to be incorporated

Value

sf object of geometry type point

See also

calc_odm() or calc_odm_multicore() for odm_object creation and create_time_distance_sf() to calculate only the nearest target location

Examples

data(testdata) od_result <- testdata$od_result # Use e.g. n = 3 output_sf <- create_time_distance_n_sf(odm_object = od_result, n = 3)
#> New names: #> * `` -> ...1 #> * `` -> ...2 #> * `` -> ...3
#> New names: #> * `` -> ...1 #> * `` -> ...2 #> * `` -> ...3
#> Joining, by = "target_id_1"
#> Joining, by = "target_id_2"
#> Joining, by = "target_id_3"