A point-in-polygon method based on a quasi-closest point (original) (raw)

On the complexity of point-in-polygon algorithms

Computers & Geosciences, 1997

Point-in-polygon is one of the fundamental operations of Geographic Information Systems. A number of algorithms can be applied. Different algorithms lead to different running efficiencies. In the study, the complexities of eight point-in-polygon algorithms were analyzed. General and specific examples are studied. In the general example, an unlimited number of nodes are assumed; whereas in the second example, eight nodes are specified. For convex polygons, the sum of area method, the sign of offset method, and the orientation method is well suited for a single point query. For possibly concave polygons, the ray intersection method and the swath method shod be seiected. For eight node polygons, the ray intersection method with bounding rectangles is faster.

A new hierarchical triangle-based point-in-polygon data structure

Computers & Geosciences, 2009

The point-in-polygon or containment test is fundamental in computational geometry and is applied intensively in geographical information systems. When this test is repeated several times with the same polygon a data structure is necessary in order to reduce the linear time needed to obtain an inclusion result. In the literature different approaches, like grids or quadtrees, have been proposed for reducing the complexity of these algorithms. We propose a new data structure based on hierarchical subdivisions by means of tri-cones, which reduces the time necessary for this inclusion test. This data structure, named tri-tree, decomposes the whole space by means of tri-cones and classifies the edges of the polygon. For the inclusion test only the edges classified in one tri-cone are considered. The tri-tree has a set of properties which makes it specially suited to this aim, with a similar complexity to other data structures, but well suited to polygons which represent regions. We include a theoretical and practical study in which the new data structure is compared with classical ones, showing a significant improvement.

Point in polygon calculation using vector geometric methods with application to geospatial data

arXiv (Cornell University), 2023

In this work, we designed algorithms for the point in polygon problem based on the ray casting algorithm using equations from vector geometry. The algorithms were implemented using the python programming language. We tested the algorithm against the point in polygon algorithms used by the shapely (and by extension geopandas) library and the OpenCV library using points from the google Open Buildings project. Our algorithm in pure python performed much better than the shapely implementation. It also performed better than the OpenCV implementation when combined with the Numba optimization library. We also performed simulations to verify that our algorithm performance was of the order O(n).

Point-in-Convex Polygon and Point-in-Convex Polyhedron Algorithms with O(1) Complexity using Space Subdivision

There are many space subdivision and space partitioning techniques used in many algorithms to speed up computations. They mostly rely on orthogonal space subdivision, resp. using hierarchical data structures, e.g. BSP trees, quadtrees, octrees, kd-trees, bounding volume hierarchies etc. However in some applications a non-orthogonal space subdivision can offer new ways for actual speed up. In the case of convex polygon in a simple Point-in-Polygon test is of the complexity and the optimal algorithm is of log computational complexity. In the case, the complexity is even for the convex polyhedron as no ordering is defined. New Point-in-Convex Polygon and Point-in-Convex Polyhedron algorithms are presented based on space subdivision in the preprocessing stage resulting to 1 run-time complexity. The presented approach is simple to implement. Due to the principle of duality, dual problems, e.g. line-convex polygon, line clipping, can be solved in a similarly.

A Point in Non-Convex Polygon Location Problem Using the Polar Space Subdivision in E 2

The point inside/outside a polygon test is used by many applications in computer graphics, computer games and geographical information systems. When this test is repeated several times with the same polygon a data structure is necessary in order to reduce the linear time needed to obtain an inclusion result. In the literature, different approaches, like grids or quadtrees, have been proposed for reducing the complexity of these algorithms. We propose a new method using a polar space subdivision to reduce the time necessary for this inclusion test. The proposed algorithm is robust and has a performance of (), where ≪ , is the number of tested intersections with polygon edges, and the time complexity of the preprocessing is (), where is the number of polygon edges.

Computer cartography point-in-polygon programs

BIT, 1967

The official statistics and census reports give figures only for administrative units. The boundaries of these units are often changed and hence it is very difficult to compare statistics from two different periods. However, an administrative unit can always be approximated by a polygon. Real estate data are assigned to a central point for which the coordinates are known. A computer can determine whether a point belongs to a polygon or not by means of a special program. Data for all real estate central points belonging to the actual polygon are added. ]In this way it will be possible to compute data for arbitrary polygons, for instance administrative units which do not exist any longer, by assigning real estate data to the central points.

The Point in Polygon Problem for Arbitrary Polygons

A detailed discussion of the point in polygon problem for arbitrary polygons is given. Two concepts for solving this problem are known in literature: the even-odd rule and the winding number, the former leading to ray-crossing, the latter to angle summation algorithms. First we show by mathematical means that both concepts are very closely related, thereby developing a first version of an algorithm for determining the winding number. Then we examine how to accelerate this algorithm and how to handle special cases. Furthermore we compare these algorithms with those found in literature and discuss the results.

Trading Time for Space: An O(1) Average Time Algorithm for Point-in-Polygon Location Problem Theoretical Fiction or Practical Usage

Algorithms for Point-in-polygon problem solution are very often used especially in computer graphics applications. The naive implementation has O(N) processing time complexity or O(lg N) complexity i f a c o n vex polygon is considered. A new algorithm of O(1) processing complexity w as developed. The important feature of the algorithm is that preprocessing complexity is O(N) and memory requirements depend on geometrical properties of the given polygon. Usage of the algorithm is expected in applications where many points are tested whether resides in the given polygon or not. The presented approach c a n b e considered as alternative to the parallel processing usage. Experimental results are included, too.

An Extension to Winding Number and Point-in-Polygon Algorithm

IFAC PapersOnLine Journal 51-1 (2018) 548–553, 2018

This work is an extension of an axis-crossing algorithm to compute winding number for solving point in polygon for an arbitary polygon. Polygons are popular drawings in computer graphics to represent different types of structures with approximations. Solutions for point-inpolygons are many, like even-odd rule, positive-negative number, and winding number. This paper mainly deals with improvements of 'A winding number and point in polygon algorithm'. Point in polygon is a fundamental problem and has various applications in ray tracing, computer graphics, image processing, gaming applications, robotics, acoustics, geo-science etc. The main focus of this paper explains about winding number for a closed polygon 'S', to test whether point 'P' lies either inside or outside with respect to positive and negative axis-crossing algorithm method.

How Reliable Are Practical Point-in-Polygon Strategies?

Algorithms - ESA 2008

We experimentally study the reliability of geometric software for point location in simple polygons. As expected, the code we tested works very well for random query points. However, our experiments reveal that the tested code often fails for more challenging degenerate and also nearly degenerate queries.