jord.shapely_utilities.clamp.fix_starting_point#

jord.shapely_utilities.clamp.fix_starting_point(polygon_pieces: Sequence[Polygon]) Sequence[Polygon][source]#

Reconnect the starting point of a polygon’s pieces. When splitting a polygon with two lines, we want to get two pieces. However, that’s not quite how Shapely works. The outline of the polygon is a LinearRing that starts and ends at the same place, but Shapely still knows where that starting point is and splits there too. We don’t want that third piece, so we’ll reconnect the segments that touch the starting point.

Parameters:

polygon_pieces

Returns: