intake / intake-stac

Intake interface to STAC data catalogs
https://intake-stac.readthedocs.io/en/latest/
BSD 2-Clause "Simplified" License
108 stars 25 forks source link

Error due to the deprecated xr.open_rasterio() method #156

Open whyjz opened 1 year ago

whyjz commented 1 year ago

Hi,

It looks like intake-stac is affected by the recent deprecation of xarray.open_rasterio() and throws errors while loading geotiff/COG files.

Here's a minimum reproducible example:

import intake

catalog_url = 'https://www.planet.com/data/stac/catalog.json'
cat = intake.open_stac_catalog(catalog_url)

collection = cat['planet-disaster-data']
subset = collection['hurricane-harvey']['hurricane-harvey-0831']
item = subset['Houston-East-20170831-103f-100d-0f4f-RGB']

da = item['mosaic'].to_dask()

intake-stac_error

Before we address this issue by updating Intake-STAC, a quick solution is to downgrade xarray, for example:

pip install intake-stac xarray==2022.12.0