You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using the OsrmMatcher in the mappymatch library and I've noticed that the MatchResult objects returned by the match_trace method do not contain geometry or distance to road information for the matched segments.
Here's a simplified version of the code I'm using:
import pandas as pd
import geopandas as gpd
from mappymatch.constructs.trace import Trace
from mappymatch.matchers.osrm import OsrmMatcher
# read gps points from file
gdf = gpd.read_file(file_path)
# create trace object from geodataframe
trace = Trace.from_geo_dataframe(gdf, xy=False)
# create OSRM matcher
matcher = OsrmMatcher()
# match trace
match_result = matcher.match_trace(trace)
When I inspect the MatchResult object, I see that each match has a road_id attribute, but there's no geometry or distance information available (see screenshot).
It seems like perhaps the OSRM server does not return geometry information as part of the map matching process, but it would be very helpful if the MatchResult objects could include this information. This would allow users to visualize the matched segments without having to manually retrieve the geometry from their original map data.
Is there a way to include geometry information in the MatchResult objects, or could this be considered for a future update? Is there something off about my code or a step I've missed?
Thank you for your time and consideration.
The text was updated successfully, but these errors were encountered:
The OsrmMatcher was introduced more of a proof of concept and we haven't been using it much in our own map matching applications. So, it hasn't received much attention beyond the initial writing of it. That being said, it's cool to hear that you're getting some traction out of it.
It does look like OSRM returns geometry from their API and we actually have a todo to get that injected into the match results.
I can put together an issue for finishing the work on that and hopefully we can release that feature in the near future. And, if you're interested in taking a stab we always welcome contributions 😄
@nreinicke thank you for your work on the library! It's been very helpful for work I'm doing to conflate GPS data to networks quickly and somewhat painlessly! It's a complex issue as you know. ;). Thanks for opening an issue! I'll take a look at the code and see if I might be able to roll my sleeves up and contribute on this feature.
Hello,
I've been using the
OsrmMatcher
in themappymatch
library and I've noticed that theMatchResult
objects returned by thematch_trace
method do not contain geometry or distance to road information for the matched segments.Here's a simplified version of the code I'm using:
When I inspect the
MatchResult
object, I see that eachmatch
has aroad_id
attribute, but there's no geometry or distance information available (see screenshot).It seems like perhaps the OSRM server does not return geometry information as part of the map matching process, but it would be very helpful if the
MatchResult
objects could include this information. This would allow users to visualize the matched segments without having to manually retrieve the geometry from their original map data.Is there a way to include geometry information in the
MatchResult
objects, or could this be considered for a future update? Is there something off about my code or a step I've missed?Thank you for your time and consideration.
The text was updated successfully, but these errors were encountered: