py_eddy_tracker.poly.vertice_overlap

py_eddy_tracker.poly.vertice_overlap(x0, y0, x1, y1, minimal_area=False, p1_area=False, hybrid_area=False, min_overlap=0)[source]

Return percent of overlap for each item.

Parameters:
  • x0 (array) – x for polygon list 0

  • y0 (array) – y for polygon list 0

  • x1 (array) – x for polygon list 1

  • y1 (array) – y for polygon list 1

  • minimal_area (bool) – If True, function will compute intersection/little polygon, else intersection/union

  • p1_area (bool) – If True, function will compute intersection/p1 polygon, else intersection/union

  • hybrid_area (bool) – If True, function will compute like union, but if cost is under min_overlap, obs is kept in case of fully included

  • min_overlap (float) – under this value cost is set to zero

Returns:

Result of cost function

Return type:

array

By default

\[Score = \frac{Intersection(P_0,P_1)_{area}}{Union(P_0,P_1)_{area}}\]

If minimal area:

\[Score = \frac{Intersection(P_0,P_1)_{area}}{min(P_{0 area},P_{1 area})}\]

If P1 area:

\[Score = \frac{Intersection(P_0,P_1)_{area}}{P_{1 area}}\]