Geometry utils#

The madcubapy.utils package offers a set of utils to perform geometry operations.

Measure area and centroid of polygons#

The polygon_area() and polygon_signed_area() functions measure the area and signed area of a polygon. The signed area of a polygon encodes its orientation, negative area if its vertices are ordered clockwise and positive area if counterclockwise.

The calculate_polygon_centroid() calculates the centroid of a polygon.