Skip to main content
. 2020 Apr 6;20(7):2057. doi: 10.3390/s20072057
Algorithm 2: Neighbor Query in DBSCAN
Input: a set of GPS trajectory trj={p1,p2,,pm}, parameters εl,εs
Output: a set of trjs={trj1,trj2,,trjn}
1. trjs;
2. trjsnei rtree.query(trj.mbr);
3. curPathstrj.candidate;
4. foreach (t in trjs_nei)
5.   neiPathst.candidate;
6.   if (dis(t.p1,trj.p1)<εl and dis(t.pn,trj.pm)<εl)
7.    dnJaccardDissimilarity(curPaths,neiPaths,εs)
8.    if (dn<εs)
9.     trjst
10.    end if
11.   end if
12. end foreach