GPS stay ponit驻留点算法

来源:互联网 发布:poi数据统计 编辑:程序博客网 时间:2024/06/03 21:31

Input : A GPS log P ,a distance threshold distThreh and time span threshold timeThreh
Output: A set of stay points SP={S}


i=0;pointNum=|P|; //the numner of GPS points
while i<pointNum do
 j:=i+1;Token:=0;
  while j<pointNum do
 dist:=Distance(Pi,Pj); //calculate the distance between points
 if dist>distThreh then
  ΔT:=Pj.T-Pi.T //calculate the time span between two points
  if ΔT>timeThreh then
      S.coord:=ComputMeanCoord({Pk|i<=k<=j})
      S.arvT:=Pi.T;S.levT=Pj.T;
      SP.insert(S);
   i:=j;Token=1;
          break;
    j:j+1
  if Token!=1 then i=i+1;
return SP.

 

原创粉丝点击