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 to get information from original GPS points linked with matched edge #56

Closed
treerapot123 opened this issue Mar 27, 2020 · 4 comments

Comments

@treerapot123
Copy link

treerapot123 commented Mar 27, 2020

I would like to get some attributes from original GPS points (say, timestamp) and link them to matched edge (in cpath). However, if there are some unmatched points ramdomly occured, i could not know the correct order of the matched edge (in opath) related with original GPS points (the order should not be the same as in original GPS points). So, is it possible to get the information from original GPS points linked with matched edge, please?

@cyang-kth
Copy link
Owner

@treerapot123

I am not quite sure about your problem. The optimal path (opath below) contains the edge matched for each point in a trajectory. Is that what you need?

https://fmm-wiki.github.io/docs/documentation/output/

@treerapot123
Copy link
Author

treerapot123 commented Mar 27, 2020

Thank you very much for quick reply. i like to assign the timestamp from 5 GPS points (orange points from original trajectory shown in above figure) to matched edge (in opath) . For instance, given the time stamps of GPS points to be (t1,t2,t3,t4,t5) respectively.
If, say, the 2th orange point (original trajectory) can not be matched, so opath = 2,13,14,23. Under this case, i can not map timestamps (t1,t2,t3,t4,t5) to the matched edge in opath (2,13,14,23), please.
So, is it possible to also assign the index of points to matched edge in opath (say, opath = 2(1), 13(3), 14(4), 23(5)) where value in (...) is the index of points.)

@cyang-kth
Copy link
Owner

@treerapot123

Now I understand your problem. The master branch version of the fmm does not handle this unmatched point problem. If t2 is not matched, then the whole trajectory is skipped and not matched.

However, a separate segmentation branch actually addressed this issue (it is not fully tested so not merged into the master)

https://github.com/cyang-kth/fmm/tree/feature-segmentation

where if t2 is not matched, the opath field will have a value of -1 so you can iterate through the same timestamps and check if there are any value of -1 in opath.

1;2,2,13,-1,14,23;2,5,13,-1,14,23;2|2,5,13|13,-1|-1,14|14,23;0.792391,0.788102,0.896001,0,0.975345,0.966437;0.999961,0.756067,0,0,0.895804;MULTILINESTRING((2 0.250988700565,2 0.701836158192),(2 0.701836158192,2 1,2 2,2.49336158192 2),(),(),(3.54929378531 2,4 2,4 2.45776836158))

You can check this example for more detailed illustration

https://github.com/cyang-kth/fmm/tree/feature-segmentation/example/segment

You need to clone that branch using

git clone -b feature-segmentation git@github.com:cyang-kth/fmm.git

@treerapot123
Copy link
Author

Thank you very much. That is what i need please.

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