woodbri / osrm-tools

Tools to extract postgresql database into OSRM normalized files, and postgresql function to access OSRM Server.
BSD 2-Clause "Simplified" License
30 stars 6 forks source link

Resilience to OSRM error 207 “Cannot find route between points" #5

Open ZupoLlask opened 10 years ago

ZupoLlask commented 10 years ago

Hi all!

When using osrm_dmatrixgetjson function it is not uncommon, at some point, to get this error 207 “Cannot find route between points" with osrm-tools function aborting right after.

How do you avoid osrm_dmatrixgetjson function to cancel because some particular coordinates are not routable?

woodbri commented 10 years ago

I could change the code to place a -1 in the cell. The reason that I didn't do this is because I wanted to know if the matrix was not complete. adding -1 would allow it to finish, but then you have to scan the whole matrix to determine if it is valid or not. maybe I can add an extra argument that will control the -1 or error condition. I'll look into that when I get a chance.

ZupoLlask commented 10 years ago

That looks like a perfect solution! As it behaves today, how can one know which pair of coordinates is breaking the dmatrix generation?

Helder Alves On Mar 9, 2014 2:26 AM, "Stephen Woodbridge" notifications@github.com wrote:

I could change the code to place a -1 in the cell. The reason that I didn't do this is because I wanted to knoe if the matrix was not complete. adding -1 would allow it to finish, but then you have to scan the whole matrix to determine if it is valid or not. maybe I can add an extra argument that will control the -1 or error condition. I'll look into that when I get a chance.

Reply to this email directly or view it on GitHubhttps://github.com/woodbri/osrm-tools/issues/5#issuecomment-37117066 .