Waypoints are points along the trajectory, which do not necessarily correspond to cells. They are selected in such a way that all parts of the trajectory are covered
select_waypoints(
trajectory,
n_waypoints = 200,
trafo = sqrt,
resolution = sum(trafo(trajectory$milestone_network$length))/n_waypoints,
recompute = FALSE
)add_waypoints(
trajectory,
n_waypoints = 200,
trafo = sqrt,
resolution = sum(trafo(trajectory$milestone_network$length))/n_waypoints,
recompute = FALSE
)
is_wrapper_with_waypoints(trajectory)
add_waypoints
returns the trajectory with waypoints added, which is a list containing:
milestone_percentages and progressions: The milestone percentages and progressions of each waypoint, in the same format as the cell equivalents (see add_trajectory()
) but with a waypoint_id column instead of a cell_id column
geodesic_distances: a matrix with the geodesic distance of each waypoint (rows) to every cell (columns)
waypoint_network: a dataframe containing the network between consecutive waypoints, it contains information on the connected waypoints (from and to) and the edge on which they reside (from_milestone_id and to_milestone_id)
waypoints: the waypoint identifiers
**select_waypoints
returns the list as mentioned in add_waypoints
The trajectory as created by infer_trajectory()
or add_trajectory()
The number of waypoints
Transformation function of the edge lengths
The resolution of the waypoints, measured in the same units as the lengths of the milestone network edges, will be automatically computed using n_waypoints
Force recompute