graphhopper / map-matching

The map matching functionality is now located in the main repository https://github.com/graphhopper/graphhopper#map-matching
https://www.graphhopper.com/open-source/
Apache License 2.0
785 stars 273 forks source link

Fix infinite loop that is due to recursive edge explorer usage #162

Closed easbar closed 5 years ago

easbar commented 5 years ago

This is the minimal fix for the infinite recursion discussed in #161 : We need to create a new edge explorer in each step of the recursion and turn off query graph cache. I do not think this has performance implications, because we are only traversing a few (in many cases probably just one) virtual edges and with core-1.0-pre4 query graph cache no longer improves performance anyway: https://github.com/graphhopper/graphhopper/pull/1751#discussion_r338244055

A probably better fix would be to implement this whole "check which virtual edge goes in which direction" logic in core without having to traverse virtual edges until we meet a real node in the first place.

karussell commented 5 years ago

Thanks!

karussell commented 5 years ago

A probably better fix would be to implement this whole "check which virtual edge goes in which direction" logic in core without having to traverse virtual edges until we meet a real node in the first place

:+1: and probably avoid recursion and only create 2 EdgeExplorers.