This is a segment-based map matching framework.
You can run the example by running
python example.py
The input traj list is
[(104.05558, 30.65341, 1541374547.0), (104.05592, 30.65307, 1541374541.0), ...]
Output is
road obs obs_ne timestamp longitude latitude length road_prop
0 2344329063-1159149348 0 0 2018-11-04 23:35:41 104.05592 30.65307 136.448 1.000000
1 1159149348-1159149349 1 0 2018-11-04 23:35:47 104.05558 30.65341 228.927 1.000000
2 1159149348-1159149349 2 0 2018-11-04 23:35:53 104.05524 30.65370 228.927 1.000000
3 1159149348-1159149349 3 0 2018-11-04 23:35:59 104.05464 30.65396 228.927 1.000000
4 1159149348-1159149349 4 0 2018-11-04 23:36:05 104.05401 30.65415 228.927 0.840335
5 1159149349-1159945489 5 0 2018-11-04 23:36:11 104.05360 30.65432 314.568 1.000000
6 1159149349-1159945489 6 0 2018-11-04 23:36:17 104.05366 30.65451 314.568 1.000000
7 1159149349-1159945489 7 0 2018-11-04 23:36:23 104.05397 30.65502 314.568 1.000000
8 1159149349-1159945489 8 0 2018-11-04 23:36:29 104.05439 30.65568 314.568 1.000000
9 1159149349-1159945489 9 0 2018-11-04 23:36:35 104.05464 30.65608 314.568 1.000000