cartagen.simplify_building_ruas#
- simplify_building_ruas(building, edge_threshold, parallel_limit=0.3490658503988659, orthogonal_limit=0.3490658503988659)#
Simplify buildings by removing edges.
This algorithm proposed by Ruas [1] analyses the edges of the polygon to find the ones that should be removed and how they can be replaced. It was integrated in the AGENT project. Port of the CartAGen implementation of the algorithm.
- Parameters:
building (
Polygon) – The shapely building to be simplified.edge_threshold (
float) – Minimum length of an edge to be considered by the simplification algorithm.parallel_limit (
float, optional) – Limit angle to consider an edge into the parallel case of the simplification algorithm. The default value is set to \(20·pi/180\)orthogonal_limit (
float, optional) – Limit angle to consider an edge into the orthogonal case of the simplification algorithm. The default value is set to \(20·pi/180\)
- Returns:
See also
square_polygon_lsSquares polygon using the least squares method.
References
Examples
>>> building = Polygon([(0, 0), (0, 10), (2, 10), (2, 9), (10, 9), (10, 0), (0, 0)]) >>> simplify_building_ruas(building, 2.5) <POLYGON ((0 0, 0 9.5, 10 9.5, 10 0, 0 0))>