Skip to main content
. 2020 Apr 6;20(7):2057. doi: 10.3390/s20072057
Algorithm 1: Candidate Path Search (CPS)
Input: GPS trajectory trj={p1,p2,⋯,pm}; the set of edges in road network E; search radius r; heading change threshold β;
Output: a set of Path={path1,path2,⋯,pathn}
1. for (i=1;i≤m;i++)
2.   CEi← CandidateRoadSegmentQuery(pi,E,r,β)
3. end for
4. Path←CE1
5. for (i=2;i≤m;i++)
6.   Path′←∅;
7.   foreach (p in Path)
8.    foreach (ce in CEi)
9.      σ←∑k=1mek.length/ek.speedlimit
10.      paths← PathForestQuery(p.lastedge,ce,σ);
11.      Path′←paths;
12.    end foreach
13.   end foreach
14.   Path←PathConnect(Path,Path′);;
15. end for