# pointpats.Window¶

class pointpats.Window(parts, holes=[])[source]

Geometric container for point patterns.

A window is used to define the area over which the pattern is observed. This area is used in estimating the intensity of the point pattern. See PointPattern.lambda_window.

Parameters
parts: sequence

A sequence of rings which bound the positive space point pattern.

holes: sequence

A sequence of rings which bound holes in the polygons that bound the point pattern.

Attributes
area

Returns the area of the polygon.

bbox

Returns the bounding box of the polygon as a list

bounding_box

Returns the bounding box of the polygon.

centroid

Returns the centroid of the polygon

holes

Returns the holes of the polygon in clockwise order.

len

Returns the number of vertices in the polygon.

parts

Returns the parts of the polygon in clockwise order.

perimeter

Returns the perimeter of the polygon.

vertices

Returns the vertices of the polygon in clockwise order.

Methods

 Build the quad tree structure for this polygon. contains_point(self, point) Test if polygon contains point
 filter_contained
__init__(self, parts, holes=[])[source]

Returns a polygon created from the objects specified.

__init__(Point list or list of Point lists, holes list ) -> Polygon

Parameters
verticeslist – a list of vertices or a list of lists of vertices.
holeslist – a list of sub-polygons to be considered as holes.
>>> p1 = Polygon([Point((0, 0)), Point((1, 0)), Point((1, 1)), Point((0, 1))])