elongation
cellseg_gsontools.geometry.elongation(polygon, **kwargs)
¶
Compute the elongation of a polygon.
Note
Elongation is the ratio between the length and width of the object bounding box. If the ratio is equal to 1, the object is roughly square or circularly shaped. As the ratio decreases from 1, the object becomes more elongated. - Wirth
Elongation: $$ \frac{\text{bbox width}}{\text{bbox height}} $$
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polygon |
Polygon
|
Input shapely polygon object. |
required |
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
The elongation value of a polygon between 0-1. |