Is your feature request related to a problem? Please describe.
Using to_xarray on an example from CNES S3 Datalake seems to trigger concurrent downloading of data:
This is lasting for about a minute, and generates high memory spikes (more than GiB temporarily for an entire product).
Describe the solution you'd like
to_xarray should not load the data. open_rasterio from rioxarray only needs to read the metadata of the rasters to create the xarray structure. Plus, the ipywidget in a Jupyter env seems to indicate some temporary download?
Describe alternatives you've considered
Use directly rioXarray, e.g.
import rioxarray as rxr
import xarray as xr
with env:
xr_da_b2 = rxr.open_rasterio(product.assets["B02"]["href"]).squeeze() # remove band dimension
xr_da_b3 = rxr.open_rasterio(product.assets["B03"]["href"]).squeeze()
xr_da_b4 = rxr.open_rasterio(product.assets["B04"]["href"]).squeeze()
xr_da_b8 = rxr.open_rasterio(product.assets["B08"]["href"]).squeeze()
xr_ds = xr.Dataset(data_vars={'blue':xr_da_b2, 'green':xr_da_b3, 'red':xr_da_b4, 'nir': xr_da_b8})
xr_ds
Is your feature request related to a problem? Please describe.
Using to_xarray on an example from CNES S3 Datalake seems to trigger concurrent downloading of data:
This is lasting for about a minute, and generates high memory spikes (more than GiB temporarily for an entire product).
Describe the solution you'd like
to_xarray should not load the data. open_rasterio from rioxarray only needs to read the metadata of the rasters to create the xarray structure. Plus, the ipywidget in a Jupyter env seems to indicate some temporary download?
Describe alternatives you've considered
Use directly rioXarray, e.g.