abrensch / brouter

configurable OSM offline router with elevation awareness, Java + Android
MIT License
476 stars 115 forks source link

Find matching points in areas with longer distance between way points #583

Closed afischerdev closed 1 year ago

afischerdev commented 1 year ago

According to issue #568 two changes for get better results on long distances around searching points.

  1. Do a second round when a way point is not found to get all square around the search square
  2. Add a greater difference value for a finishing check (rc.waypointCatchingRange wasn't enough)

A 3rd idea is drop for now - tile generation: add pseudo points when no points in an areas.

devemux86 commented 1 year ago

waypointCatchingRange wasn't enough

However, using the waypointCatchingRange allows better flexibility as this variable can be changed by apps?

Also its default value could be larger?

afischerdev commented 1 year ago

The problem was on the other side of route generation. The error message was in both cases 'from position not found'. In first case this was true and it's useful to start a second round. In second case the engine doesn't find the end of the route and starts a new round of route searching, where the from point is not found. The value is not only checked for distance, cost and distance is used. So it may be better to add a new finishing tolerance value than using waypointCatchingRange.

afischerdev commented 1 year ago

BRouter runs several rounds of routing before finish. The previous run has an 'airDistanceCostFactor' and we compare the last result with the new costs. so I used the old factor again for compare. Now we can stay with the old tolerance of 100.