select_vertices_by_coordinates: Select vertices on graph that are closest to the specified...

Description Usage Arguments Value Examples

Description

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

Usage

1
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

1
2
3
4
5
6
7
8
## 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)

## End(Not run)

osm-router/osmprob documentation built on May 24, 2019, 4:53 p.m.