This script performs squaring/orthogonalization of polygons, in other words making all its angles 90˚ or 180˚, which is usefull for automated adjustment of building footprint shapes. Script uses GeoPandas and Shapely packages and is an improved implementation of JOSM Orthogonalize function. Supports Polygons with internal holes as well as Multipolygons and a typical polygon takes on Core i7-6660U 2.4GHz about ~0.34s processing time.
Features
Preserving angled features
Comparison to JOSM
Example: