Skip to main content

Alternative Solutions for Continuous K Nearest Neighbor Queries in Spatial Network Databases


Continuous K nearest neighbor queries (C-KNN) are defined as finding the nearest points of interest along an enitre path (e.g., finding the three nearest gas stations to a moving car on any point of a pre-specified path). The result of this type of query is a set of intervals (or split points) and their corresponding KNNs, such that the KNNs of all points within each interval are the same. The current studies on C-KNN focus on vector spaces where the distance between two objects is a function of their spatial attributes (e.g., Euclidean distance metric). These studies are not applicable to spatial network databases (SNDB) where the distance between two objects is a function of the network connectivity (e.g., shortest path between two objects). In this paper, we propose two techniques to address C-KNN queries in SNDB: Intersection Examination (IE) and Upper Bound Algorithm (UBA). With IE, we first find the KNNs of all nodes on a path and then, for those adjacent nodes whose nearest neighbors are different, we find the intermediate split points. Finally, we compute the KNNs of the split points using the KNNs of the surrounding nodes. The intuition behind UBA is that the performance of IE can be improved by determining the adjacent nodes that cannot have any split points in between, and consequently eliminating the computation of KNN queries for those nodes. Our empirical experiments show that the UBA approach outperforms IE, specially when the points of interest are sparsely distributed in the network.

This is a preview of subscription content, access via your institution.


  1. J. Feng and T. Watanabe. A Fast Method for Continuous Nearest Target Objects Query on Road Network. VSMM'02, Korea, pp. 182–191, Sept. 2002.

  2. G.R. Hjaltason and H. Samet. “Distance browsing in spatial databases,” TODS, Vol. 24(2):265–318, 1999.

    Article  Google Scholar 

  3. G.S. Iwerks, H. Samet, and K. Smith. Continuous K-Nearest Neighbor Queries for Continuously Moving Points with Updates. VLDB, Berlin, Germany, pp. 512–523, 2003.

  4. C.S. Jensen, J. Kolrvr, Torben Bach Pedersen, and Igor Timko. Nearest Neighbor Queries in Road Networks. ACM-GIS03, New Orleans, LA, USA, 2003.

  5. M. Kolahdouzan and C. Shahabi. Voronoi-Based K Nearest Neighbor Search for Spatial Network Databases. VLDB, Toronto, Canada, 2004.

  6. F. Korn, N. Sidiropoulos, C. Faloutsos, E. Siegel, and Z. Protopapas. Fast Nearest Neighbor Search in Medical Image Databases. VLDB, Mumbai (Bombay), India, 1996.

  7. Y. Li, J. Yang, and J. Han. Continuous K-Nearest Neighbor Search for Moving Objects. SSDBM, Santorini Island, Greece, 2004.

  8. A. Okabe, B. Boots, K. Sugihara, and S.N. Chiu. Spatial Tessellations, Concepts and Applications of Voronoi Diagrams. 0-471-98635-6, 2nd Edition, John Wiley and Sons Ltd: England, 2000.

    Google Scholar 

  9. D. Papadias, J. Zhang, N. Mamoulis, and Y. Tao. Query Processing in Spatial Network Databases. VLDB, Berlin, Germany, 2003.

  10. N. Roussopoulos, S. Kelley, and F. Vincent. Nearest Neighbor Queries. SIGMOD, San Jose, CA, 1995.

  11. T. Seidl and H.-P. Kriegel. Optimal Multi-Step k-Nearest Neighbor Search. SIGMOD, Seattle, WA, USA, 1998.

  12. S. Shekhar and J.S. Yoo. Processing in-Route Nearest Neighbor Queries: A Comparison of Alternative Approaches. ACM-GIS03, New Orleans, LA, USA, 2003.

  13. P. Sistla, O. Wolfson, S. Chamberlain, and S. Dao. Modeling and Querying Moving Objects. IEEE ICDE, 1997.

  14. Z. Song and N. Roussopoulos. K-Nearest Neighbor Search for Moving Query Point. SSTD, Redondo Beach, CA, USA, 2001.

  15. Y. Tao and D. Papadias. Time Parameterized Queries in Spatio-Temporal Databases. SIGMOD, 2002.

  16. Y. Tao, D. Papadias, and Q. Shen. Continuous Nearest Neighbor Search. VLDB, Hong Kong, China, 2002.

  17. X. Xiong, M.F. Mokbel, and W.G. Aref. SEA-CNN: Scalable Processing of Continuous K-Nearest Neighbor Queries in Spatio-temporal Databases. ICDE, Tokyo, Japan, 2005.

Download references

Author information

Authors and Affiliations


Corresponding author

Correspondence to Mohammad R. Kolahdouzan.

Rights and permissions

Reprints and Permissions

About this article

Cite this article

Kolahdouzan, M.R., Shahabi, C. Alternative Solutions for Continuous K Nearest Neighbor Queries in Spatial Network Databases. Geoinformatica 9, 321–341 (2005).

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: