Extract OpenStreetMap network in sf format from a network.dat built with setup_r5
Extract OpenStreetMap network in sf format from a network.dat built with setup_r5
street_network_to_sf(r5r_core)
r5r_core |
a rJava object, the output from 'r5r::setup_r5()' |
A list with two components of a street network in sf format: vertices (POINT) and edges (LINESTRING).
Other support functions:
assert_points_input(),
check_connection(),
download_metadata(),
posix_to_string(),
select_mode(),
set_max_lts(),
set_max_rides(),
set_max_street_time(),
set_n_threads(),
set_speed(),
set_suboptimal_minutes(),
set_verbose(),
stop_r5()
if (interactive()) {
library(r5r)
# build transport network
path <- system.file("extdata/poa", package = "r5r")
r5r_core <- setup_r5(data_path = path)
# extract street network from r5r_core
street_net <- street_network_to_sf(r5r_core)
stop_r5(r5r_core)
}Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.