[R-sig-Geo] help needed regarding package OSRM
Shruti Tripathi
shruti.tripathi at nipfp.org.in
Tue Nov 7 14:27:30 CET 2017
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 matrix of source and destination, for
example
route <- osrmRoute(src = com[1:10, 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]]
More information about the R-sig-Geo
mailing list