Re: Open Santinel 2 archives with Rasterio


GDALs Sentinel2 driver exposes the data as subdatasets, with (sort of) one for each resolution -

To access the subdataset that contains the 10m bands, you could use something like the following:

import rasterio

with'') as s2a:
subdatasets = s2a.subdatasets

with[0]) as b10m:

{'driver': 'SENTINEL2', 'dtype': 'uint16', 'nodata': None, 'width': 10980, 'height': 10980, 'count': 4, 'crs': CRS.from_epsg(32651), 'transform': Affine(10.0, 0.0, 600000.0,
0.0, -10.0, 5100000.0), 'blockxsize': 128, 'blockysize': 128, 'tiled': True, 'compress': 'jpeg2000'}

Join to automatically receive all group messages.