Select vertices on graph that are closest to the specified coordinates.

select_vertices_by_coordinates(graph, start_coords, end_coords)

Arguments

graph

data.frame containing the street network.

start_coords

numeric coordinates of the start point.

end_coords

numeric coordinates of the end point.

Value

list containing the two rows of the input data.frame that are closest to the start and end coordinates

Examples

not_run({ road <- road_data_sample start_pt <- c (11.603, 48.163) end_pt <- c (11.608, 48.167) pts <- select_vertices_by_coordinates (graph = road, start_coords = start_pt, end_coords = end_pt) })