Repository navigation
Add 100m radius restriction to point hint matches - #1935
Merged
Merged
Conversation
Member
|
Thanks! |
Contributor
Author
|
Added to contributors #1937 and email sent |
karussell
requested changes
Feb 28, 2020
karussell
left a comment
Member
There was a problem hiding this comment.
Thanks, looks good - see my comments!
| } | ||
|
|
||
| private static BBox createBBox(NodeAccess na, EdgeIteratorState edgeState) { | ||
| public static BBox createBBox(NodeAccess na, EdgeIteratorState edgeState) { |
Member
There was a problem hiding this comment.
This would be better to duplicate and keep private
| this.rewriteMap = rewriteMap; | ||
| this.nodeAccess = nodeAccess; | ||
| this.pointHint = prepareName(removeRelation(pointHint == null ? "" : pointHint)); | ||
| this.pointCircle = new Circle(point.lat, point.lon, WITHIN_RADIUS_METERS); |
Member
There was a problem hiding this comment.
Can you make the radius configurable i.e. just move to a constructor parameter (and call it with 100 in the templates or something)?
Member
|
Thanks! |
Member
|
This improved routing performance btw, for example something like 10% for CH routing with hints 👍 |
Contributor
Author
|
Awesome 😄 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1828
NameSimilarityEdgeFilter has a circle of radius 100m around the original point. It then looks up the bounding box of the edges and see if they intersect with the circle. This is to help the issue where for some reason or another, it fails to match with the correct road and ends up matching one far away.
I've added a test to make sure it only matches nearby points. For the majority of the matching tests we're only testing name similarity so I used a mock node access that gives 0 distance between the nodes and overloaded the methods.