abrensch / brouter

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

More on misplaced via points #519

Open afischerdev opened 1 year ago

afischerdev commented 1 year ago

Here comes an idea for an update on the misplaced via point logic.

The current lib prevents simple spikes by going back and testing for equal connections. Please see point two in this sample.

New is the recalculation on a via point section with a polygon circle and finding the in and out points. And use these points for a new findtrack session to get areas on roundabouts or other non-trivial situations.

dreieich

This also covers older issues like #441 comment

Braunschweig

What do you think?

It take a little bit more on time. And it's not fully tested. But if interested have a look into the repository.

0709wiwiwi commented 1 year ago

Axel you are a busy bee. I can hardly follow because of other pursuits too. What are you trying to get extra ? In gps app user language ? With the Android beta apk I don't notice any error on that roundabout ?
Turning the Via points into shaping points makes for an even neater result.
Drei roundabout

Drei.gpx.txt

polyscias commented 1 year ago

What do you think?

Great idea.

I find it hard to review the code but if it does do good things to slightly misplaced via points it would be good to have!

0709wiwiwi commented 1 year ago

I don't notice any error on that roundabout ?

However, what I did notice with this example is that the via wpt 1 disappeared. I have previously seen each time that a via (or shaping) was correctly matched and included in the export navigation track as a track point with sym "turn" plus type via or shaping but never noticed that it 'disappeared'. ;-)

The via (shaping) points seem to have inexplicably moved or are taking each other's place. What exactly happens to this "special design" no idea.

Production: I downloaded the track and waypoints on the website. Using the track as template and the waypoints to calculate.

afischerdev commented 1 year ago

@0709wiwiwi You are right, may be this is not a clear sample.

  1. the trekking profile goes the wrong way to via point 1. please see #485
  2. in this case the missplacing is recalcualted by going back the line.

When you switch to car routing (or change your bike profile) it will go the correct way around and you become a nice circle tour with missplacing.

Screenshot_20230330-104720

0709wiwiwi commented 1 year ago

Thanks. I would never have figured that out myself ;-) Displaced Via points effect (announced by the name) an extra annoyance of course. Certainly, the extra function assists you, no licence to criss-cross place planner points.

afischerdev commented 1 year ago

@polyscias Thank you for your code review. It's good to know that someone is keeping an eye on it. And I believe this it is not the morning paper for reading. I think I have to add some more comments in the code.

There is a merge with the last updates from main BRouter.