download_graph: Download OSM road graph and preprocess it

Description Usage Arguments Value Examples

Description

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.

Usage

1
2
download_graph(start_pt, end_pt, weighting_profile = "bicycle", buffer = 0,
  quiet = TRUE)

Arguments

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. osmprob::weighting_profiles contains all available profiles.

buffer

Positive value that defines by how much (in percent) should the downloaded data extend the bounding box defined by start_pt and end_pt.

quiet

If FALSE, print progress information to screen.

Value

graphs list containing the original street graph, a minimized graph map linking the two to each other.

Examples

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

## End(Not run)

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