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

Function for map matching of trajectories #114

Open
luukvdmeer opened this issue Jan 30, 2021 · 6 comments
Open

Function for map matching of trajectories #114

luukvdmeer opened this issue Jan 30, 2021 · 6 comments
Labels
feature 🎁 Request a new feature help wanted 🆘 Input from others would be helpful

Comments

@luukvdmeer
Copy link
Owner

Is your feature request related to a problem? Please describe.
Map matching of GPS trajectories is a common task in spatial network analysis. Maybe sfnetworks should have functions to support this. It is not an easy topic, but maybe there are already implementations in R that can take away some of the burden (maybe in the trajectories package?). Something to look into.

@luukvdmeer luukvdmeer added feature 🎁 Request a new feature help wanted 🆘 Input from others would be helpful labels Jan 30, 2021
@agila5
Copy link
Collaborator

agila5 commented Jan 30, 2021

I've never worked with trajectory data but other approaches that could be explored are trackeR and sftrack.

@CKerouanton
Copy link

Hello,

Here is an implementation of a famous mapmatching algorithm, in java, but can be launched from R : https://github.com/julienperret/mapmatcher

@harryprince
Copy link

harryprince commented Jan 7, 2022

I think we need to make a PR to add map matching functions into this repo.
there is an existing simple implementation by @edzer https://github.com/ngort01/fuzzyMM

@edzer
Copy link

edzer commented Jan 8, 2022

there is an existing simple implementation by @edzer https://github.com/ngort01/fuzzyMM

not by me, but by Nikolai Gorte (at that time a student I supervised)

@Robinlovelace
Copy link
Collaborator

Another approach would be an interface to existing map matching implementations, e.g. that in OSRM. Blog post on that with a detailed worked example: https://blog.dend.ro/map-matching-osrm/

@grobins
Copy link

grobins commented Mar 21, 2023

Another approach would be an interface to existing map-matching implementations, e.g. that in OSRM. Blog post on that with a detailed worked example: https://blog.dend.ro/map-matching-osrm/

I have implemented OSRM to obtain OSM ids for GPS traces. I turned to sfnetworks because matching a GPS trace with the start and end locations is much faster.

The drawback I'm facing is that I want to feed in waypoints along the GPS trip, as well as the start and end constraints. I can then be more confident that the route returned matches the vehicle's actual route.

EDIT: adding the image below for clarity.
The grey line is the one returned by sfnetworks, but the black line is the route I know the vehicle took.
I want to use sfnetworks to force the routing to the black line, and extract all the osm_ids underneath
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 🎁 Request a new feature help wanted 🆘 Input from others would be helpful
Projects
None yet
Development

No branches or pull requests

7 participants