is_point_in_polygon

is_point_in_polygon(polygon, points)[source]

Check which points are contained in a general polygon.

This may be more efficient than polygon.intersection(MultiPoint(points)) if the polygon’s Delaunay triangulation consists of only few partitions.

Parameters
  • polygon (Polygon) – a triangle

  • points (ndarray) – an (N, 2) coordinate array.

Return type

ndarray

Returns

a boolean (N,) array