This function uses osmdata
to download a OSM street graph. The extent
of the downloaded area is defined by the start and end coordinates of the
desired path plus a buffer, that extends the bounding box in all directions.
The graph is then preprocessed for routing purposes, which includes removing
topologically unnecessary parts and calculating edge weights based on the
selected weighting profile.
download_graph(start_pt, end_pt, weighting_profile = "bicycle", buffer = 0, quiet = TRUE)
start_pt | Two numeric values (latitude, longitude) as start point coordinates. |
---|---|
end_pt | Two numeric values (latitude, longitude) as end point coordinates. |
weighting_profile | Name of the used weighting profile.
|
buffer | Positive value that defines by how much (in percent) should the
downloaded data extend the bounding box defined by |
quiet | If FALSE, print progress information to screen. |
graphs list
containing the original street graph, a minimized
graph map linking the two to each other.
not_run({ start_pt <- c (11.580, 48.140) end_pt <- c (11.585, 48.145) graph <- download_graph (start_pt = start_pt, end_pt = end_pt, weighting_profile = "bicycle", buffer = 0) })