Summarise links from shortest paths data
Summarise links from shortest paths data
sum_network_links(sln, routedata)
sln |
The SpatialLinesNetwork or sfNetwork to use. |
routedata |
A dataframe where the first column contains the Node ID(s) of the start of the routes, the second column indicates the Node ID(s) of the end of the routes, and any additional columns are summarised by link. If there are no additional colums, then overlapping routes are counted. |
Find the shortest path on the network between specified nodes and returns a SpatialLinesDataFrame or sf containing the path(s) and summary statistics of each one.
Other rnet:
SpatialLinesNetwork
,
calc_catchment_sum()
,
calc_catchment()
,
calc_moving_catchment()
,
calc_network_catchment()
,
find_network_nodes()
,
gsection()
,
islines()
,
lineLabels()
,
overline_spatial()
,
overline()
,
plot,SpatialLinesNetwork,ANY-method
,
plot,sfNetwork,ANY-method
,
rnet_breakup_vertices()
,
rnet_group()
,
sln2points()
,
sum_network_routes()
sln_sf <- SpatialLinesNetwork(route_network_sf) plot(sln_sf) nodes_df <- data.frame( start = rep(c(1, 2, 3, 4, 5), each = 4), end = rep(c(50, 51, 52, 33), times = 5) ) weightfield(sln_sf) # field used to determine shortest path library(sf) shortpath_sf <- sum_network_links(sln_sf, nodes_df) plot(shortpath_sf["count"], lwd = shortpath_sf$count, add = TRUE)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.