.point_in_polygon | R Documentation |
Raycasting Algorithm to find out whether a point is in a given polygon. Performs the even-odd-rule Algorithm to find out whether a point is in a given polygon. This runs in O(n) where n is the number of edges of the polygon.
.point_in_polygon(polygon, point)
polygon |
an array representation of the polygon where polygon[i,1] is the x Value of the i-th point and polygon[i,2] is the y Value. |
point |
an array representation of the point where point[1] is its x Value and point[2] is its y Value |
whether the point is in the polygon (not on the edge, just turn < into <= and > into >= for that)
Javier Porobic
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.