libpysal.cg.
Polygon
(vertices, holes=None)[source]¶Geometric representation of polygon objects.
Attributes: |
|
---|
Methods
build_quad_tree_structure () |
Build the quad tree structure for this polygon. |
contains_point (point) |
Test if polygon contains point |
__init__
(vertices, holes=None)[source]¶Returns a polygon created from the objects specified.
__init__(Point list or list of Point lists, holes list ) -> Polygon
Parameters: |
|
---|
Examples
>>> p1 = Polygon([Point((0, 0)), Point((1, 0)), Point((1, 1)), Point((0, 1))])
Methods
__init__ (vertices[, holes]) |
Returns a polygon created from the objects specified. |
build_quad_tree_structure () |
Build the quad tree structure for this polygon. |
contains_point (point) |
Test if polygon contains point |
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. |