filter_non_polygons#

sectionproperties.pre.geometry.filter_non_polygons(input_geom: GeometryCollection | LineString | Point | Polygon | MultiPolygon) Polygon | MultiPolygon[source]#

Filters shapely geometries to return only polygons.

Returns a Polygon or a MultiPolygon representing any such Polygon on MultiPolygon that may exist in the input_geom. If input_geom is a LineString or Point, an empty Polygon is returned.

Parameters:

input_geom (GeometryCollection | LineString | Point | Polygon | MultiPolygon) – Shapely geometry to filter

Returns:

Filtered polygon

Return type:

Polygon | MultiPolygon