solidity
cellseg_gsontools.geometry.solidity(polygon, **kwargs)
¶
Compute the solidity of a polygon.
Note
Solidity measures the density of an object. It is defined as the ratio of the area of an object to the area of a convex hull of the object. A value of 1 signifies a solid object, and a value less than 1 will signify an object having an irregular boundary, or containing holes. - Wirth
Solidity: $$ \frac{A_{poly}}{A_{convex}} $$
where \(A_{poly}\) is the area of the polygon and \(A_{convex}\) is the area of the convex hull.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polygon |
Polygon
|
Input shapely polygon object. |
required |
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
The solidity value of a polygon between 0-1. |