I have some trajectory data (a set of gps points, they are from the same trip so spatially close to each other). I want to find the k-nearest-line-segments for each of the point. I know that I can do a knn search in a RTree to get the knn for one point and repeat it for every other point. I think there might be some better solutions since these points are close to each other and so the searching doesn't need to start from root every time. Is there such a quick way? Thank you
Asked
Active
Viewed 432 times
1 Answers
1
Try to formulate your query using "regions of interest".
With trajectories, you usually have an upper bound on what is a possible match, and region queries can be ued to retrieve multiple candidates efficiently.

Has QUIT--Anony-Mousse
- 76,138
- 12
- 138
- 194
-
I come back because I have a question about the "regions of interest" you mentioned. For a trajectory, we can create minimum bounding rectange for it, then we use range search to get all the nodes that intersects with the mbr. However, I think for knn search, it cannot be guaranteed that the knn will be inside the candidates we got from the range search. In other words, the real knn might be outside of the candidates for some points. I might have misunderstood the "regions of interest" and the "upper bound". – daydayup Jan 08 '16 at 16:54
-
could you give me more information on how to find a safe/sufficient "region of interest" for trajectory searching? I mean a region that can guarantee the knn will lie inside it? Thank you! – daydayup Jan 08 '16 at 16:54
-
That is something you need to define for your application. Often it may be possible to define a maximum distance of interest. If you are querying in Hawaii, you are not interested in the nearest trajectory if it is in Los Angeles, for example. – Has QUIT--Anony-Mousse Jan 08 '16 at 19:21