py_eddy_tracker.poly

Method for polygon

Functions

bbox_intersection

Compute bbox to check if there are a bbox intersection.

box_index

Return k_box index for each value

box_indexes

Return i_box,j_box index for each value

close_center

Compute an overlap with circle parameter and return a percentage

convex

Check if polygon is convex

convexs

Check if polygons are convex

create_meshed_particles

create_vertice

Return polygon vertice.

create_vertice_from_2darray

Choose a polygon in x,y list and return vertice.

fit_circle

From a polygon, function will fit a circle.

fit_circle_

From a polygon, function will fit a circle.

fit_ellipse

From a polygon, function will fit an ellipse.

get_convex_hull

Get convex polygon which enclosed current polygon

get_pixel_in_regular

Get a pixel list of a regular grid contain in a contour.

get_wrap_vertice

Return a vertice for each polygon and check that use same reference coordinates.

group_obs

Get index k_box for each box, and indexes to sort

insidepoly

True for each postion inside a contour

is_left

Test if point is left of an infinit line.

merge

Merge all polygon of the list

poly_area

Must be called with local coordinates (in m, to get an area in m²).

poly_area_vertice

Compute area from vertice.

poly_contain_poly

Check if poly_in is include in poly_out.

poly_indexs

Index of contour for each postion inside a contour, -1 in case of no contour

polygon_overlap

Return percent of overlap for each item.

reduce_size

Reduce array size if last position is repeated, in order to save compute time

shape_error

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

tri_area2

Double area of triangle

vertice_overlap

Return percent of overlap for each item.

visvalingam

Polygon simplification with visvalingam algorithm

winding_number_grid_in_poly

Return index for each grid coordinates within contour.

winding_number_poly

Check if x,y is in poly.