• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

J4 ›› 2012, Vol. 34 ›› Issue (11): 96-103.

• 论文 • Previous Articles     Next Articles

A Line Clip Algorithm of Based on Cell and R-Tree Spatial Indexes against Arbitrary Polygon Window

LI Nan1,WU Xincai2,MA Jinjin3,WANG Zhong4   

  1. (1.Institute of Mineral Resources Chinese Academy of Geological Sciences,Beijing 100037;2.School of the Earth Sciences and Resources,China University of Geosciences,Beijing 100083;3.School of Information Science and Engineering,Central South University,Changsha 410083;4.School of Resources and Environments,Hefei University of Technology,Hefei 230009,China)
  • Received:2011-09-21 Revised:2011-11-22 Online:2012-11-25 Published:2012-11-25

Abstract:

There are three main problems in line clip:reducing the number of segments intersection,reducing the time complexity for computation property of intersections and determining whether nonintersection lines is in clip polygons.This paper presents an improved line clip algorithm against general polygon window.The algorithm uses RTree and Cell structures to calculate segment intersections between segments in lines and segments in polygon edges.Then,based on uniform subdivision,a method named local radial is introduced in order to reduce the time complexity for pointinpolygon.The algorithm has three improvements.Firstly,segmentintersections of two spatial index structures can be calculated simultaneously.Secondly,a ‘local radial method’ is presented to reduce the time complexity for computation property of intersections,whose time complexity is,and the method avoids judging the orientation of clip polygons.Finally,the algorithm can be used in the clipping window that is general polygon.

Key words: R-Tree;cell index;clipping line;local radial