point_is_inside_polygon#

regridding.geometry.point_is_inside_polygon(x, y, vertices_x, vertices_y)[source]#

Check if a given point is inside or on the boundary of a polygon specified by its vertices.

This function uses the extended winding number algorithm described by Kumar and Bangi[1], which addresses boundary issues with the “classic” winding number algorithm in Alciatore and Miranda[2].

Parameters:
  • x (float) – \(x\) component of the test point

  • y (float) – \(y\) component of the test point

  • vertices_x (ndarray) – \(x\) component of the polygon’s vertices

  • vertices_y (ndarray) – \(y\) component of the polygon’s vertices

Return type:

bool

References