Repository navigation
Issue 218: Autoexpanding search for nodes around a certain coordinate - #221
JohannesPelzer wants to merge 2 commits into
Conversation
|
Thanks!
|
|
I thought a bit about this ... and the filtering this is not necessary! But it is necessary to check the distance r_min of the query location to the boundaries of the 'tile'. And if the distance to the closest point is larger than r_min one has to increase the search EVEN if a close point was found because another point in the other regions could be closer. I'll give you a sketch in a minute. |
|
Here X is the query location, C is the closest location if only points of the first tile M are taken into account. And P is the closest point if all necessary 9 tiles are taken into account. I.e. only if r_min >= r (distance to closest point) we are on the safe side. |
|
Ah, yes! That would make it indeed faster! |
|
As discussed, unfortunately this optimization is not possible as we could miss an edge which is closest and has no nodes within the circle. So just grab all the nodes of the tile. The creation of the index makes sure we won't miss close edges with nodes in other tiles. Then proceed with the next iteration IF r_min < dist(X,C). Important but simple: avoid all nodes which were already processed. |
|
This sounds really good! But is it a lot more complex to implement? |
|
New code is pushed and should be available. |
|
The GraphVisualizer seems interesting, do you have it somewhere :) ? |
|
Hmmh, there is a problem. When I fix the bug in getMinDistance ( |
|
|
|
As written in #232 we won't fix this less precise rasterization for now and only exit for every second iteration. Also found a minor glitch in calculateRMin, which will speed-up all a bit. Will merge soon. |
|
Merged: 97b10f1 and thanks again! Also there was a bug in SpatialKeyAlgo which made the position off by 1/2 * cell_size. I'm wondering that everything worked at all ;) (just joking, was also hidden due to the neighboring search) |
Co-authored-by: easbar <[email protected]>



Implementation of autoexpanding search, following @karussell his suggestions in #218