- resqpy.olio.point_inclusion.pip_wn(p, poly)¶
2D point inclusion: returns True if point is inside polygon (uses winding number algorithm).
p (numpy array, tuple or list of at least 2 floats) – xy point to test for inclusion in polygon
poly (2D numpy array, tuple or list of tuples or lists of at least 2 floats) – the xy points defining a polygon
boolean – True if point is within the polygon
if the polygon is represented by a closed resqpy Polyline, pass Polyline.coordinates as poly