def bounds(self): """Returns minimum bounding region (minx, miny, maxx, maxy)""" # TODO(shapely-2.0) return empty tuple or (nan, nan, nan, nan)? if self.is_empty: return () else: return tuple(shapely.bounds(self).tolist())
def bounds(self): """Returns minimum bounding region (minx, miny, maxx, maxy)""" return tuple(shapely.bounds(self).tolist())
def test_bounds_dimensions(geom, shape): assert shapely.bounds(geom).shape == shape
def test_bounds(geom, expected): assert_array_equal(shapely.bounds(geom), expected)