I am using the OSRM API to (1) determine the nearest point on a road segment from a give random point with
http://server:5000/nearest?loc=_lat_,_lon_The returned coordinates are used then as an input to (2) determine the route between this point and an other give point on a road segment with
http://server:5000/viaroute?loc=_lat1_,_lon1_&loc=_lat2_,_lon2_Every now and then the point determined in step (1) is located on a non routable road (e.g. private road).
I am looking for a way to work around this problem.
a) Is there a way to determine in step (1) the next closest point on a different road segment or only query road segments on routable roads.
or
b) Is there a way that the routing query in (2) automatically determines the next closest routable point?
I am also open for different solutions. However I am not interested in setting up my own server with pgrouting or similar services. I like to solve it with an open source routing API (preferable with the OSRM one).
The request is done from a python script (requests and json).
أكثر...
http://server:5000/nearest?loc=_lat_,_lon_The returned coordinates are used then as an input to (2) determine the route between this point and an other give point on a road segment with
http://server:5000/viaroute?loc=_lat1_,_lon1_&loc=_lat2_,_lon2_Every now and then the point determined in step (1) is located on a non routable road (e.g. private road).
I am looking for a way to work around this problem.
a) Is there a way to determine in step (1) the next closest point on a different road segment or only query road segments on routable roads.
or
b) Is there a way that the routing query in (2) automatically determines the next closest routable point?
I am also open for different solutions. However I am not interested in setting up my own server with pgrouting or similar services. I like to solve it with an open source routing API (preferable with the OSRM one).
The request is done from a python script (requests and json).
أكثر...