find_nearest_point_index

find_nearest_point_index#

zeroheliumkit.src.utils.find_nearest_point_index(polygon: Polygon, point: Point) int[source]#

Finds the index of the closest point in a Shapely polygon to a given point.

Parameters:
  • polygon (Polygon) – The input Shapely polygon.

  • point (Point) – The Shapely point to compare.

Returns:

The index of the closest point in the polygon’s exterior.

Return type:

int