Re: [R-sig-Geo] help needed regarding package OSRM

2017-11-07 Thread Bacou, Melanie
This works for me (`f` is a data.frame of X,Y origin locations, `t` is a data.frame of X,Y destinations): osrm_api <- function(f, t, key=NULL) {   url <- "https://router.project-osrm.org/table/v1/driving/"   url <- paste0(url,     paste(f$X,

[R-sig-Geo] help needed regarding package OSRM

2017-11-07 Thread Shruti Tripathi
Hi, We want to compute the distances between two matrices of points in (long, lat) This is how, as per the manual distance is calculated between two points: route <- osrmRoute(src = com[1, c("comm_id", "lon","lat")], dst = com[15, c("comm_id", "lon","lat")]) How would I compute the same for a