# NOT RUN {
# from <- matrix(stplanr::geo_code("pedallers arms leeds"), ncol = 2)
from <- matrix(c(-1.5327711, 53.8006988), ncol = 2)
# to <- matrix(stplanr::geo_code("gzing"), ncol = 2)
to <- matrix(c(-1.527937, 53.8044309), ncol = 2)
pts <- rbind(from, to)
colnames(pts) = c("X", "Y")
# net <- dodgr::dodgr_streetnet(pts = pts, expand = 0.1)
# osm_net_example <- net[c("highway", "name", "lanes", "maxspeed")]
r <- route_dodgr(from, to, net = osm_net_example)
plot(osm_net_example$geometry)
plot(r, add = TRUE, col = "red", lwd = 5)
# }
Run the code above in your browser using DataLab