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

The result of map matching distracted me #176

Closed Mohammed-9089 closed 3 years ago

Mohammed-9089 commented 3 years ago

Hi, I hope you're fine.... I'm looking for a solution of the trajectories which have reverse movements issues, that after checking the MM results of two trajectories as follows: Sample of trajectory 1 and 2, respectively. Sample1.txt So, after several trial with the parameters the results have been progressed but still has some abnormal movements (reverse movements). Can you check the images below, please: Traj1 Traj2 Optimal parameters found as: k = 4 & 8 radius = 0.003 gps_error = 0.003 & 0.005 reverse_tolerance = 0.5 & 0.1 Accordingly, I have two Q:

  1. How can I solve this additional trajectory movements?
  2. In case I need to save the results of CSV point file including timestamp, I mean is there any way to save the Fmm_Reaslut.txt file including timestamp of each matched node?; Because the timestamp is very necessary for my work. Thanks for your help again......!!! @cyang-kth
cyang-kth commented 3 years ago

Generally, OSM data in China does not have a high quality so I am not sure if the topology of the network is correct or not. The problem you show here seems to be an issue caused by GPS data encryption. https://en.wikipedia.org/wiki/Restrictions_on_geographic_data_in_China. The GPS data is encrypted so that it contains a very large offset from the WGS84 coordinate system. You need to transform the network from WGS84 to GCJ02 (which is the GPS data coor)

https://github.com/googollee/eviltransform

Mohammed-9089 commented 3 years ago

@cyang-kth Thanks for your reply, in generally after searching about conversion from (WGS84 to GCJ 02), I understood the problem and get the point, so after I downloaded the OSM Network of Xi'an city as example, similarly to your example (Download network in a city). Now which file I must convert it, specifically?

cyang-kth commented 3 years ago

You need to convert the edges.shp as the GPS is in GCJ02 but the network is in WGS84. After conversion, they are all in GCJ02.

Mohammed-9089 commented 3 years ago

@cyang-kth Thanks again....!!!, so I should extract GPS coor(x,y) from edges.shp file column (geometry), then apply one of converter methods? Please can you suggest to me converter method, if that is possible....!