cartagen.polygon_elongation#
- polygon_elongation(polygon)#
Calculate the elongation of a polygon.
This function calculates the elongation of a polygon using the
minimum_rotated_rectangle. It is the ratio between the length and the width of this rectangle.Examples
>>> polygon = Polygon([(0, 0), (0, 1), (2, 1), (2, 0), (0, 0)]) >>> polygon_elongation(polygon) 2.0