mirror of
https://github.com/rasterio/rasterio.git
synced 2025-12-08 17:36:12 +00:00
13 lines
222 B
Python
13 lines
222 B
Python
import pprint
|
|
|
|
import rasterio
|
|
from rasterio.features import shapes
|
|
|
|
with rasterio.open('tests/data/shade.tif') as src:
|
|
image = src.read(1)
|
|
|
|
# Print the first two shapes...
|
|
pprint.pprint(
|
|
list(shapes(image))[:2]
|
|
)
|