from_polygon_to_bounds
from_polygon_to_bounds#
- from_polygon_to_bounds(polygon: typing.Union[shapely.geometry.polygon.Polygon, shapely.geometry.multipolygon.MultiPolygon]) -> (<class 'float'>, <class 'float'>, <class 'float'>, <class 'float'>)[source]#
Convert a
shapely.polygon
to its bounds, sorted asleft, bottom, right, top
.>>> poly = Polygon(((0., 0.), (0., 1.), (1., 1.), (1., 0.), (0., 0.))) >>> from_polygon_to_bounds(poly) (0.0, 0.0, 1.0, 1.0)