py_eddy_tracker.poly.shape_error

py_eddy_tracker.poly.shape_error(x, y, x0, y0, r)[source]

With a polygon(x,y) in local coordinates.

and circle properties(x0, y0, r), function compute a shape error:

\[ShapeError = \frac{Polygon_{area} + Circle_{area} - 2 * Intersection_{area}}{Circle_{area}} * 100\]

When error > 100, area of difference is bigger than circle area

Parameters:
  • x (array) – x of polygon

  • y (array) – y of polygon

  • x0 (float) – x center of circle

  • y0 (float) – y center of circle

  • r (float) – radius of circle

Returns:

shape error

Return type:

float