def test_shapes_connectivity_rook(diagonal_image):

    with Env():
        assert len(list(shapes(diagonal_image, connectivity=4))) == 12
Diagonals are not connected, so there will be 1 feature per pixel plus
dataset/ETHPy150Open mapbox/rasterio/tests/test_features.py/test_shapes_connectivity_rook