In this paper, we study the Obstructed Nearest Neighbor (ONN) problem: given a set of points and a set of polygonal obstacles in two dimensions, find the k nearest neighbors to a query point according to the length of the shortest obstacle-avoiding path between two points. ONN query is useful both as a standalone tool in geographical information systems and as a primitive for spatial data analysis such as clustering and classification in the presence of obstacles. We propose an efficient ONN algorithm that processes only the data points and obstacles relevant to the query in an incremental way and thus filters out a large number of points and obstacles. Experiments on spatial data sets show the algorithm scales well with respect to the input data size and the number of nearest neighbors requested.
展开▼