cyang-kth / fmm

Fast map matching, an open source framework in C++
https://fmm-wiki.github.io/
Apache License 2.0
878 stars 205 forks source link

Wrong map matching using stmatch #189

Closed ziXet closed 3 years ago

ziXet commented 3 years ago

Hi,

I've been working with this library for a while and found it really elegant!

Today, I faced this issue in map matching using stmatch. I already changed the input parameters to get the correct map matching result but was not successful.

Issue: stmatch is giving a wrong map matching result.

stmatch command: stmatch --network ./edges.shp -k 8 -r 0.003 --vmax 0.005 --gps 1.csv --network_id id --source u --target v --output 1.out.csv --use_omp

Expected behavior stmatch should calculate the matching path correctly.

Screenshots Input Trajectory: Screenshot from 2021-04-09 16-58-45

Output:

mgeom: Screenshot from 2021-04-09 16-57-07

pgeom: Screenshot from 2021-04-09 16-56-41

Network: Screenshot from 2021-04-09 16-23-22

Zip file including network shape file and input/output. test.zip

Any help would be appreciated.

Thanks!

cyang-kth commented 3 years ago

@ziXet

The reason is that at road intersections, there are a lot of candidate edges so k=8 is too small to cover the correct candidate. After setting k=16, it seems to be correct now.

stmatch --network ./edges.shp -k 16 -r 0.003 --vmax 0.005 --gps 1.csv \
--network_id id --source u --target v --output 2.out.csv

k = 8

a

k = 16

b