group_top_and_bottom_polys#
- sectionproperties.pre.bisect_section.group_top_and_bottom_polys(polys: GeometryCollection, line: LineString) tuple[list[Polygon], list[Polygon]][source]#
Sort polygons into groups above and below a line.
Returns a tuple of two lists representing the list of polygons in
polyson the “top” side oflineand the list of polygons on the “bottom” side of thelineafter the original geometry has been split byline.The 0th tuple element is the “top” polygons and the 1st element is the “bottom” polygons.
In the event that
lineis a perfectly vertical line, the “top” polys are the polygons on the “right” of thelineand the “bottom” polys are the polygons on the “left” of theline.- Parameters:
polys (GeometryCollection) – Collection of polygons to sort
line (LineString) – Line about which polygons have been split
- Returns:
List of polygons above and below the line
- Return type: