This vignette is work in progress - watch this space!

library(stplanr)

Route networks represent the network of highways, cycleways, footways and other ways along which transport happens. Unlike routes, each segment on the network can only appear once.

stplanr can be used to convert a series of routes into a route network, using the function overline2(), as illustrated below:

sample_routes = routes_fast_sf[2:6, NULL]
sample_routes$value = rep(1:3, length.out = 5)
rnet = overline2(sample_routes, attrib = "value")
plot(sample_routes["value"], lwd = sample_routes$value, main = "Routes")
plot(rnet["value"], lwd = rnet$value, main = "Route network")

The above figure shows how overline2() breaks the routes into segments with the same values and removes overlapping segments. It is a form of geographic aggregation.