- class foxes.utils.geom2d.ClosedPolygon(foxes.utils.geom2d.AreaGeometry)[source]
This class represents a closed 2D polygon.
Attributes¶
- points: numpy.ndarray
The polygon points
- poly: matplotlib.path.Path
The closed polygon geometry
Public members¶
- ClosedPolygon(points)[source]
Constructor.
-
points_distance(points, return_nearest=
False)[source] Calculates point distances wrt boundary.
- points_inside(points)[source]
Tests if points are inside the geometry.
-
add_to_figure(ax, show_boundary=
True, fill_mode=None, ...)[source] Add image to (x,y) figure.
- box_centre()[source]
Returns centre (x,y) point of the surrounding box.