-
Notifications
You must be signed in to change notification settings - Fork 26
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
LCSS matcher failing #202
Comments
Hello @nreinicke, any updates on this? |
@iaguerri - Thanks for reaching out and apologies that I haven't had a chance to look at this! I don't know exactly why it's not catching this edge case but perhaps you would be able to share the trace that your using so I can take a look at it on my end? |
Hey @nreinicke here you have the Trace ! Please tell me if there are any doubts The NxMap is the one of Madrid |
The problem isn’t with this specific trip, but rather that Mappymatch struggles with trips that loop over the same trajectories, even when adjusting parameters like |
@iaguerri - I just got a chance to look at this. I think I was able to get the trace matching appropriately by setting the cutting threshold to 20.0, here's the code I used: from mappymatch.constructs.trace import Trace
from mappymatch.constructs.geofence import Geofence
from mappymatch.maps.nx.nx_map import NxMap, NetworkType
from mappymatch.utils.plot import plot_matches, plot_path
from mappymatch.matchers.lcss.lcss import LCSSMatcher
trace = Trace.from_csv("package9_ok_sequence.csv", lat_column="lat", lon_column="long")
geofence = Geofence.from_trace(trace, padding=2e3)
nx_map = NxMap.from_geofence(
geofence,
network_type=NetworkType.DRIVE,
)
matcher = LCSSMatcher(nx_map, cutting_threshold=20.0)
match_result = matcher.match_trace(trace)
plot_matches(match_result, crs=match_result.crs)
plot_path(match_result.path, crs=match_result.crs) Which resulted in this for the matches: And this for the path: Let me know if you're still not able to reproduce. |
Loops are definitely challenging for the algorithm and so hopefully this works for your use. Maybe in the future we can spend more time investigating these edge cases and trying to make the algorithm more robust 😄 |
Hey there!
I'm using Mappymatch for GPS coordinates. In this example, I have 93 coordinates.
While the tool is very accurate, I have encountered a problem—a single trace loops twice within a circuit. During the first lap, the loop is matched correctly.
In the photograph, the red line represents the Path result, the yellow points represent the trace, and the black line represents the OSM roads used for matching.
As shown in the second photo, points 44 and 45 are quite close to the road, so the Path should ideally follow that route. However, instead of continuing, it incorrectly takes the "exit" road.
I have tried adjusting the parameters but haven't determined the issue. Why does it divert from the road when half of the points are remaining?
Thanks in advance 😄
The text was updated successfully, but these errors were encountered: