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) { } On 11/07/2017 08:27 AM, Shruti Tripathi
wrote:
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 = "" c("comm_id", "lon","lat")], dst = com[15, c("comm_id", "lon","lat")]) How would I compute the same for a matrix of source and destination, for example route <- osrmRoute(src = "" c("comm_id", "lon","lat")], dst = com[11:20, c("comm_id", "lon","lat")]) how do i do this??? Regards Shruti [[alternative HTML version deleted]] _______________________________________________ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo |
_______________________________________________ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo