Algorithm for determining whether a point is inside a polygon. Normally calculated by counting the number of polygon line segments that a ray from the point intersects.
Questions tagged [point-in-polygon]
275 questions
-2
votes
1 answer
Determine if a point is within a large number of polygons
I'm aware of a ray casting methodology, however, this doesn't work for situated points along vertices and it only tests for the inclusion of a point inside of one polygon.
Is there a better way to do this other than just iterating the ray casting…

hownowbrowncow
- 465
- 1
- 5
- 18
-3
votes
2 answers
Efficiently determining whether a point is inside a triangle or on the edge WITHOUT DOUBLE PRECISION
How to determine whether a point lies inside of a triangle or on the edge efficiently, if possible with constant time. WITH NO DOUBLE PRECISION
Context:
The plane is two dimensional
Triangle is set according to three coordinate pairs Coord(int x,…

Zechariah Kapustin
- 11
- 2
-3
votes
2 answers
Point in Polygon Algorithm in Programming Contests
What is the best algorithm to solve point in polygon in programming contests?

user1284064
- 175
- 2
- 9
-4
votes
1 answer
Can someone please explain the Ray-casting algorithm for point in polygon i.e. containment check?
Consider a polygon with two loops i.e. Outer loop& inner loop as shown in the images attached with this question(One can think of an English letter "e" for example). Can someone please explain how exactly the Ray-casting algorithm will work in such…

Shreekant
- 297
- 2
- 3
- 10
-4
votes
1 answer
Java library to find all polygons containing a point
I have to store a set of 2D polygons in memory (less than 1000) in a structure which allows to find efficiently the ones containing a point. Polygons never change and contain about 10 points.
I have to launch the query about 10000 times per…

mvera
- 904
- 12
- 23