, Volume 19, Issue 3, pp 435–461 | Cite as

Querying visible points in large obstructed space



Querying visible points is a fundamental problem in computational geometry and spatial databases. With the development of new applications such as trip planning and nearest neighbors, querying visible points plays a key role in obstacle space and the result can be further used such as defining the shortest path. Thereby, efficiently finding the result is essentially important. However, the performance of current methods decrease substantially for large datasets. To solve the problem, we proposes a new and fast algorithm to find visible points for an arbitrary query location inside a large polygon containing obstacles. The method is based on polygon triangulation. By decomposing the polygon into a set of triangles, we manage the polygon by organizing triangles in an efficient way instead of maintaining a large number of vertices. We propose a data structure to partition the searching space into several parts, each of which is independently processed. Afterwards, by recursively calling a method we search visible points by accessing triangles and return the result in a progressive way. Through a theoretical analysis, assuming the polygon contains N vertices in total, the time complexity of our algorithm is O(N), improving the existing method O(N l o g N). We prove the correctness of the algorithm and analyze the space complexity, which is O(N). The technique is extended to return visible points less than a threshold distance to the query location. Using both synthetic and real datasets, we perform extensive experiments to test our algorithm and demonstrate its efficiency and effectiveness. Visible points are efficiently processed in a large obstacle space with over one million vertices. Experimental results show that our technique gains more than one order of magnitude speedup compared to competitive methods using large datasets.


Visible points Obstacle space Polygon triangulation 



This work is supported in part by NSFC under grants 61300052, the Fundamental Research Funds for the Central Universities under grants NZ2013306 and Natural Science Foundation of Jiangsu Province of China under grants BK20130810. The first author thanks Bin Yao for helpful comments on the revised version of this paper.


  1. 1.
  2. 2.
  3. 3.
  4. 4.
  5. 5.
    Ben-Moshe B, Hall-Holt OA, Katz MJ, Mitchell JSB (2004) Computing the visibility graph of points within a polygon. In: symposium on computational geometry, pp 27–35Google Scholar
  6. 6.
    Chazelle B (1982) A theorem on polygon cutting with applications.In: IEEE symposium on foundations of computer scienceGoogle Scholar
  7. 7.
    De Berg M, Kreveld M, Overmars M, Schwarzkopf O (2000) Computational geometry:algorithms and applications, 2nd edn. Springer, BerlinCrossRefGoogle Scholar
  8. 8.
    Gao Y, Zheng B (2009) Continuous obstructed nearest neighbor queries in spatial databases.In: SIGMOD, pp 577–590Google Scholar
  9. 9.
    Gao Y, Zheng B, Chen G, Lee WC, Lee KCK, Li Q (2009) Visible reverse k-nearest neighbor query processing in spatial databases. TKDE 21(9):1314–1327Google Scholar
  10. 10.
    Gao Y, Zheng B, Lee W, Chen G (2009) Continuous visible nearest neighbor queries. In: EDBT, pp 144–155Google Scholar
  11. 11.
    Ghosh S K (2007) Visibility algorithms in the plane. Cambridge University Press, United KingdomCrossRefGoogle Scholar
  12. 12.
    Ghosh SK, Mount DM (1991) An output-sensitive algorithm for computing visibility graphs. SIAM J Comput 20(5):888–910CrossRefGoogle Scholar
  13. 13.
    Guibas L, Hershberger J, Leven D, Sharir M, Tarjan RE (1987) Linear-time algorithms for visibility and shortest path problems inside triangulated simple polygons. Algorithmica 2:209–233CrossRefGoogle Scholar
  14. 14.
    Held M (2001) Fist:fast industrial-strength triangulation of polygons. Algorithmica 30(4):563–596CrossRefGoogle Scholar
  15. 15.
    Hershberger J, Snoeyink J (1994) Computing minimum length paths of a given homotopy class. Comp Geom Theory and Appl 4:63–97CrossRefGoogle Scholar
  16. 16.
    Hershberger J, Suri S (1999) An optimal algorithm for euclidean shortest paths in the plane. SIAM J Comput 28(6):2215–2256CrossRefGoogle Scholar
  17. 17.
    Kapoor S, Maheshwari SN, Mitchell JSB (1997) An efficient algorithm for euclidean shortest paths among polygonal obstacles in the plane. Discrete Comput Geom 18:377–383CrossRefGoogle Scholar
  18. 18.
    Kazemi L, Kashani FB, Shahabi C, Jain R (2010) Efficient approximate visibility query in large dynamic environments. In: DASFAA (1), pp 202–217Google Scholar
  19. 19.
    Lee DT, Preparata FP (1984) Euclidean shortest paths in the presence of rectilinear barriers. Networks 14(3):393–410CrossRefGoogle Scholar
  20. 20.
    Masud S, Choudhury F M, Ali M E, Nutanong S (2013) Maximum visibility queries in spatial databases. In: ICDE, pp 637–648Google Scholar
  21. 21.
    Mitchell JSB (1996) Shortest paths among obstacles in the plane. Internet Journal Comput Geom 6:309–332CrossRefGoogle Scholar
  22. 22.
    Narkhede A, Manocha D (1995) Fast polygon triangulation based on Seidel’s algorithm. Academic Press, Graphics Gems VCrossRefGoogle Scholar
  23. 23.
    Nutanong S, Tanin E, Zhang R (2007) Visible nearest neighbor queries. In: DASFAA, pp 876–883Google Scholar
  24. 24.
    Overmars M H, Welz E (1988) New methods for computing visibility graphs.In: Proceedings 4th annual ACM symposium on computational geometry, pp 164–171Google Scholar
  25. 25.
    Park SH, Lee JH, Kim DH (2007) Spatial clustering based on moving distance in the presence of obstacles. In: DASFAA, pp 1024–1027Google Scholar
  26. 26.
    Pocchiola M, Vegter G (1995) Minimal tangent visibility graph. Comput Geom Theor Appl 6:303–314CrossRefGoogle Scholar
  27. 27.
    Sharir M, Schorr A (1986) On shortest paths in polyhedral spaces. SIAM J Comput 15(1):193–215CrossRefGoogle Scholar
  28. 28.
    Storer JA, Reif JH (1994) Shortest paths in the plane with polygonal obstacles. J ACM 41(5):982–1012CrossRefGoogle Scholar
  29. 29.
    Asano T, Ghosh SK, Shermer TC (2000) Visibility in the plane.Handbook of computation geometry. ElsevierGoogle Scholar
  30. 30.
    Tung AKH, Hou J, Han J (2001) Spatial clustering in the presence of obstacles. In: ICDE, pp 359–367Google Scholar
  31. 31.
    Xia C, Hsu D, Tung AKH (2004) A fast filter for obstructed nearest neighbor queries. In: BNCOD, pp 203–215Google Scholar
  32. 32.
    Xu J, Güting RH (2012) MWGen:a mini world generator. In: MDM, pp 258–267Google Scholar
  33. 33.
    Yang B, Lu H, Jensen CS (2009) Scalable continuous range monitoring of moving objects in symbolic indoor space. In: CIKM, pp 671–680Google Scholar
  34. 34.
    Yang B, Lu H, Jensen CS (2010) Probabilistic threshold k nearest neighbor queries over moving objects in symbolic indoor space. In: EDBT, pp 335–346Google Scholar
  35. 35.
    Zaïane OR, Lee CH (2002) Clustering spatial data in the presence of obstacles: a density-based approach. In: IDEAS, pp 214–223Google Scholar
  36. 36.
    Zhang J, Papadias D, Mouratidis K, Zhu M (2004) Spatial queries in the presence of obstacles. In: EDBTGoogle Scholar
  37. 37.
    Zhang J, Papadias D, Mouratidis K, Zhu M (2005) Query processing in spatial databases containing obstacles. Int J Geogr Inf Sci 19(10):1091–1111CrossRefGoogle Scholar

Copyright information

© Springer Science+Business Media New York 2014

Authors and Affiliations

  1. 1.Nanjing University of Aeronautics and AstronauticsNanjing JiangsuChina
  2. 2.Fern Universität in HagenHagenGermany

Personalised recommendations