resqpy.olio.point_inclusionΒΆ

point_inclusion.py: functions to test whether a point is within a polygon; also line intersection with planes.

Functions

pip_array_cn

Return bool array of 2D points inclusion, True where point is inside polygon.

pip_cn

2D point inclusion: returns True if point is inside polygon (uses crossing number algorithm).

pip_wn

2D point inclusion: returns True if point is inside polygon (uses winding number algorithm).

points_in_polygon

Takes a pair of numpy arrays x, y defining points to be tested against polygon specified in polygon_file.

scan

Scans lines of pixels returning 2D boolean array of points within convex polygon.