cartagen.polygon_concavity#
- polygon_concavity(polygon)#
Calculate the concavity of a polygon.
This function calculates the concavity of a polygon as its area divided by the area of its convex hull.
Examples
>>> polygon = Polygon([(0, 0), (0, 2), (1, 1), (2, 2), (2, 0), (0, 0)]) >>> polygon_concavity(polygon) 0.75