Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I get the matching points on the roadnet graph? #13

Open
jiaoleixin opened this issue Feb 15, 2021 · 2 comments
Open

How can I get the matching points on the roadnet graph? #13

jiaoleixin opened this issue Feb 15, 2021 · 2 comments

Comments

@jiaoleixin
Copy link

Hello! I've already gotten the matching section of the graph from returned values by DistanceMatcher.match(). But I couldn't get the accurate matching point by this method. What should I do? AND please give me a guide of the main classes if possible. THX!

@jiaoleixin
Copy link
Author

my_plot
In other words, How can I get the coordinates of the matching points on the graph(where the green lines intersect the blue ones)? Please give me a hand!

@wannesm
Copy link
Owner

wannesm commented Feb 23, 2021

This is available in the matcher.lattice_best property. This the best path in the lattice, thus the best match. It is not only the map nodes but also the matches on the segment in between two nodes. Each lattice entry is a matcher object that has an edge_m and edge_o object (resp the matched nodes and observed points). And each of these objects are of the Segment type and have a pi property that is the interpolated point (if it is interpolated, otherwise it is the start or end point of the segment and thus a node in the graph).

You can also look at that part in the visualisation code to see it in action:

if matcher and show_matching:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants