How Reliable Are Practical Point-in-Polygon Strategies? (original) (raw)

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.

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.

Testing simple polygons

Computational Geometry, 1997

We consider the problem of verifying a simple polygon in the plane using "test points". A test point is a geometric probe that takes as input a point in Euclidean space, and returns "+" if the point is inside the object being probed or "-" if it is outside, A verification procedure takes as input a description of a target object, including its location and orientation, and it produces a set of test points that are used to verify whether a test object matches the description. We give a procedure for verifying an n-sided, non-degenerate, simple target polygon using 5n test points. This testing strategy works even if the test polygon has n + 1 vertices, and we show a lower bound of 3n + 1 test points for this case. We also give algorithms using O(n) test points for simple polygons that may be degenerate and for test polygons that may have up to n + 2 vertices. All of these algorithms work for polygons with holes. We also discuss extensions of our results to higher dimensions.

Canonical polygon queries on the plane: A new approach

Arxiv preprint arXiv: …, 2008

The polygon retrieval problem on points is the problem of preprocessing a set of n points on the plane, so that given a polygon query, the subset of points lying inside it can be reported efficiently. It is of great interest in areas such as Computer Graphics, CAD applications, Spatial Databases and GIS developing tasks. In this paper we study the problem of canonical k-vertex polygon queries on the plane. A canonical k-vertex polygon query always meets the following specific property: a point retrieval query can be transformed into a linear number (with respect to the number of vertices) of point retrievals for orthogonal objects such as rectangles and triangles (throughout this work we call a triangle orthogonal iff two of its edges are axisparallel). We present two new algorithms for this problem. The first one requires O(n log 2 n) space and O(k log 3 n loglogn +A) query time. A simple modification scheme on first algorithm lead us to a second solution, which consumes O(n 2 ) space and O(k logn loglogn + A) query time, where A denotes the size of the answer and k is the number of vertices. The best previous solution for the general polygon retrieval problem uses O(n 2 ) space and answers a query in O(k log n + A) time, where k is the number of vertices. It is also very complicated and difficult to be implemented in a standard imperative programming language such as C or C++.

The fastest way to view a query point in simple polygons

2005

Abstract In this paper, we study the problem of finding the shortest path from a given source point in a simple polygon to some point visible from a given query point. We will present an algorithm based on the notion of funnels in simple polygons. The algorithm preprocesses the input containing a simple polygon and a source point to produce a data structure to answer the queries in logarithmic time. The time and space required for preprocessing is quadratic in size of the simple polygon.

Succinct geometric indexes supporting point location queries

ACM Transactions on Algorithms, 2012

We propose designing data structures called succinct geometric indexes of negligible space (more precisely, o ( n ) bits) that support geometric queries in optimal time, by taking advantage of the n points in the dataset permuted and stored elsewhere as a sequence. Our first and main result is a succinct geometric index that can answer point location queries, a fundamental problem in computational geometry, on planar triangulations in O (lg n ) time. We also design three variants of this index. The first supports point location using lg n + 2√lg n + O (lg 1/4 n ) point-line comparisons. The second supports point location in o (lg n ) time when the coordinates are integers bounded by U . The last variant can answer point location queries in O ( H + 1) expected time, where H is the entropy of the query distribution. These results match the query efficiency of previous point location structures that occupy O ( n ) words or O(n lg n ) bits, while saving drastic amounts of space. We gene...

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.

Efficient computation of query point visibility in polygons with holes

2005

Abstract In this paper, we consider the problem of computing the visibility of a query point inside polygons with holes. The goal is to perform this computation efficiently per query with more cost in the preprocessing phase. Our algorithm is based on solutions in [13] and [2] proposed for simple polygons. In our solution, the preprocessing is done in time O (n 3 log (n)) to construct a data structure of size O (n 3).