2008Computer and ModernizationRequires access

Algorithm for Point and Line in Polygon Test

Caiquan Xiong

Open publisher page 0 citations

Abstract

A convenience algorithm for point and line in polygon test,sloping line method is provided,the characteristic of this method is that the sloping line is not match together with any peak or edge of polygon,no special situation is needed processing,the computation is decreased.The prepared algorithm of line in polygon is not perfect,a new algorithm is presented.First,identify whether there are crossing points in line and polygon by a quick method,if there are crossing points,calculate the crossing points of line and polygon,put these points in order,and then make the line into several segments by these crossing points.If there is not crossing point,the line is only one segment.Test the center of every segment in polygon.If its center is in the polygon,then this segment is in the polygon,else,it is not.This algorithm is simple and effective in programming,and it is suitable for most case.

About this research paper

What this paper is about

A convenience algorithm for point and line in polygon test,sloping line method is provided,the characteristic of this method is that the sloping line is not match together with any peak or edge of polygon,no special situation is needed processing,the computation is decreased.The prepared algorithm of line in polygon is not perfect,a new algorithm is presented.First,identify whether there are crossing points in line and polygon by a quick method,if there are crossing points,calculate the crossing points of line and polygon,put these points in order,and then make the line into several segments by these crossing points.If there is not crossing point,the line is only one segment.Test the center of every segment in polygon.If its center is in the polygon,then this segment is in the polygon,else,it is not.This algorithm is simple and effective in programming,and it is suitable for most case.

Why it matters

A significance statement is not available in the OpenAlex record.

Key contribution

A contribution statement is not available in the OpenAlex record.

Method / approach

Method details are not available in the OpenAlex metadata.

Main findings

Findings are not separately available in the OpenAlex metadata.

Limitations

Limitations are not available in the OpenAlex metadata.

Applications

Application details are not available in the OpenAlex metadata.

Available abstract

A convenience algorithm for point and line in polygon test,sloping line method is provided,the characteristic of this method is that the sloping line is not match together with any peak or edge of polygon,no special situation is needed processing,the computation is decreased.The prepared algorithm of line in polygon is not perfect,a new algorithm is presented.First,identify whether there are crossing points in line and polygon by a quick method,if there are crossing points,calculate the crossing points of line and polygon,put these points in order,and then make the line into several segments by these crossing points.If there is not crossing point,the line is only one segment.Test the center of every segment in polygon.If its center is in the polygon,then this segment is in the polygon,else,it is not.This algorithm is simple and effective in programming,and it is suitable for most case.

Key concepts: Polygon (computer graphics), Visibility polygon, Simple polygon, Polygon covering, Rectilinear polygon, Star-shaped polygon, Computer science, Line (geometry)

Related papers

Back to paper searchBrowse research topicsOriginal source
Algorithm for Point and Line in Polygon Test — Research Paper | ScholarLens