Randomly Generating Routes for emission optimization

Hello

I am trying to use the open route service API to help inform a linear regression model that I am training. This requires that I have a mass amount of randomly generated starting and ending points. I have done this through a heuristic that I have coded but whenever it is run, the API outputs that the points I have inputted are not within 350 units of a known location. It is hard for me to debug this as the points that are generated remain in urban cities and should be very popular destinations. Is there a way to access the valid points that a route can be generated on?

If the points are generated within an urban area, it is very unlikely that they are too far away from the street network. Have you checked whether the coordinate order is correct? Otherwise, I have no explanation.

Hi sascha,
The coordinate order does look to be correct. Is there a way that I can obtain the coordinates that open route service considers valid? This would make it much easier as I do not have to write code that essentially guesses but instead inputs coordinates that it knows will work.

You could use the export endpoint with a small area around your input coordinates to inspect the data.
Can you post a few examples of invalid coordinates?