library(giscourse)
library(mapview)
library(tidyverse)
hengistbury<-get_node("Hengistbury head")
bu<-get_node("Bournemouth University")
shortest<-shortest_route(c(hengistbury$id,bu$id) )
mapview(shortest)
con<-connect11()
query<-sprintf("SELECT * FROM pgrouting.ways_vertices_pgr ver
JOIN ( SELECT * FROM
pgr_drivingDistance( 'SELECT gid id, source, target,
length_m/1000 as cost, length_m/1000 as reverse_cost,
the_geom FROM pgrouting.ways', %s, %s ) ) r
on ver.id = r.node",34649,10)
dist<-st_read(con,query=query)
dbDisconnect(con)
## [1] TRUE
mapview(dist)