I am using the OSRM API to (1) determine the nearest point on a road segment from a give random point with
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
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.
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).