resqpy.olio.point_inclusion.pip_array_cn
- resqpy.olio.point_inclusion.pip_array_cn(p_a, poly)[source]
Return bool array of 2D points inclusion, True where point is inside polygon.
Uses crossing number algorithm.
- Parameters:
p_a (
2D numpy float array) – set of xy points to test for inclusion in polygonpoly (
2D numpy array,tupleorlistoftuplesorlistsofat least 2 floats) – the xy points defining a polygon
- Returns:
numpy boolean vector – True where corresponding point in p_a is within the polygon
Note
if the polygon is represented by a closed resqpy Polyline, pass Polyline.coordinates as poly